Skip to content

tests: Make Carapace output order predictable #120

tests: Make Carapace output order predictable

tests: Make Carapace output order predictable #120

name: release-please
on:
push:
branches:
- main
permissions:
contents: write
pull-requests: write
jobs:
release-please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
tag_name: ${{ steps.release.outputs.tag_name }}
steps:
- id: release
uses: google-github-actions/release-please-action@v3
with:
package-name: gen-completions
release-type: rust
bump-minor-pre-major: true
bump-patch-for-minor-pre-major: true
- uses: actions/checkout@v3
if: ${{ steps.release.outputs.release_created }}
# Publish to Cargo if release created
- run: cargo publish --verbose --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
build:
name: Build (${{ matrix.os }})
runs-on: ${{ matrix.os }}
needs: release-please
if: needs.release-please.outputs.release_created
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v3
- run: cargo build --release
- run: mv ./target/release/gen-completions ./gen-completions-${{ matrix.os }}
- name: Upload executable for ${{ matrix.os }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ needs.release-please.outputs.tag_name }} ./gen-completions-${{ matrix.os }}