feat: V7 #127
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: CI | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| get-next-version: | |
| uses: semantic-release-action/next-release-version/.github/workflows/next-release-version.yml@v4 | |
| commitlint: | |
| name: CommitLint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: lts/* | |
| - name: Install Commitlint dependencies | |
| run: npm install --global @commitlint/{cli,config-conventional} | |
| - name: Check Commit Message (PR) | |
| if: github.event_name == 'pull_request' | |
| run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose | |
| - name: Check Commit Message (Push) | |
| if: github.event_name == 'push' | |
| run: npx commitlint --last --verbose | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| needs: | |
| - get-next-version | |
| - commitlint | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| # checkout as wfcd-bot-boi | |
| token: ${{ secrets.GH_TOKEN }} | |
| - name: Install semantic-release-cargo | |
| if: needs.get-next-version.outputs.new-release-published == 'true' | |
| uses: EricCrosson/install-github-release-binary@v2 | |
| with: | |
| targets: semantic-release-cargo/semantic-release-cargo@v2 | |
| - name: Prepare semantic-release for Rust | |
| if: needs.get-next-version.outputs.new-release-published == 'true' | |
| run: semantic-release-cargo prepare ${{ needs.get-next-version.outputs.new-release-version }} | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: stable | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Cargo build | |
| run: cargo build | |
| - name: Cargo build with all features | |
| run: cargo build --all-features | |
| - name: Semantic Release | |
| id: release | |
| uses: cycjimmy/semantic-release-action@v3.2.0 | |
| if: needs.get-next-version.outputs.new-release-published == 'true' | |
| env: | |
| # push as wfcd-bot-boi | |
| GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
| with: | |
| semantic_version: 18 | |
| extra_plugins: | | |
| @semantic-release/git | |
| @semantic-release/changelog | |
| @semantic-release-cargo/semantic-release-cargo |