Merge pull request #95 from spinframework/remove-ci #61
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: Release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| env: | |
| RUST_VERSION: 1.86 | |
| jobs: | |
| crates: | |
| name: Publish to crates.io | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write # required for OIDC token exchange (crates-io-auth-action) | |
| if: github.repository_owner == 'spinframework' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| shell: bash | |
| run: | | |
| rustup toolchain install ${{ env.RUST_VERSION }} | |
| rustup default ${{ env.RUST_VERSION }} | |
| - uses: rust-lang/[email protected] | |
| id: auth | |
| # - name: Publish spin-wasip3-http-macro to crates.io | |
| # working-directory: ./crates/spin-wasip3-http-macro | |
| # run: cargo publish | |
| # env: | |
| # CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} | |
| # - name: Publish spin-wasip3-http to crates.io | |
| # working-directory: ./crates/spin-wasip3-http | |
| # run: cargo publish | |
| # env: | |
| # CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} | |
| - name: Publish spin-executor to crates.io | |
| working-directory: ./crates/executor | |
| run: cargo publish | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} | |
| - name: Publish spin-macro to crates.io | |
| working-directory: ./crates/macro | |
| run: cargo publish | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} | |
| - name: Publish spin-sdk to crates.io | |
| working-directory: ./ | |
| run: cargo publish | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }} | |
| dispatch-rust-sdk-release: | |
| name: Dispatch rust-sdk-release event to spinframework/spin | |
| needs: crates | |
| runs-on: ubuntu-latest | |
| if: github.repository_owner == 'spinframework' && startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - name: Repository Dispatch | |
| uses: peter-evans/repository-dispatch@v3 | |
| with: | |
| token: ${{ secrets.SPIN_REPO_PAT }} | |
| repository: spinframework/spin | |
| event-type: rust-sdk-release | |
| client-payload: '{"version": "${{ github.ref_name }}"}' |