From 4115553164106525c5586d3e2447faa89b70a357 Mon Sep 17 00:00:00 2001 From: Yota Toyama Date: Sun, 11 Aug 2024 20:04:27 +1000 Subject: [PATCH] Add release workflow (#368) --- .github/workflows/release.yaml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..b8dc5d5 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,21 @@ +name: release +on: + push: + branches: + - main + pull_request: +concurrency: + group: release-${{ github.ref }} + cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} +jobs: + release: + runs-on: ubuntu-latest + environment: ${{ github.ref == 'refs/heads/main' && 'release' || 'test' }} + steps: + - uses: actions/checkout@v4 + - uses: raviqqe/cargo-cache@v1 + - run: cargo install cargo-workspaces + - run: cargo workspaces publish -y --from-git + env: + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + if: github.ref == 'refs/heads/main'