Prepare release spire-api v0.3.4 (#140) #12
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish Crates | |
| on: | |
| push: | |
| tags: | |
| - '*' | |
| jobs: | |
| build-and-publish: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| submodules: recursive | |
| - name: Cache Project | |
| uses: Swatinem/rust-cache@f0deed1e0edfc6a9be95417288c0e1099b1eeec3 # v2.7.7 | |
| - name: Install toolchain | |
| uses: ./.github/actions/setup-env | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Cargo Login | |
| run: cargo login ${{ secrets.CRATES_IO_TOKEN }} | |
| # Conditional step for spiffe crate | |
| - name: Publish spiffe | |
| if: startsWith(github.ref, 'refs/tags/spiffe-') | |
| run: | | |
| cd spiffe | |
| cargo publish | |
| # Conditional step for spire-api crate | |
| - name: Publish spire-api | |
| if: startsWith(github.ref, 'refs/tags/spire-api-') | |
| run: | | |
| cd spire-api | |
| cargo publish |