feat: trigger first release #2
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: Build, Test, and Release | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| - next | |
| pull_request: | |
| branches: | |
| - main | |
| - master | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| id-token: write | |
| jobs: | |
| test: | |
| name: Test Rust Library | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust Toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| profile: minimal | |
| toolchain: stable | |
| override: true | |
| target: wasm32-unknown-unknown | |
| - name: Run tests | |
| run: cargo test | |
| release: | |
| name: Semantic Release | |
| needs: [test] | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| issues: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "lts/*" | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Update Rust toolchain | |
| run: rustup update stable | |
| - name: Install cargo-edit | |
| run: cargo install cargo-edit | |
| - name: Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| run: npx semantic-release |