build(deps): bump actions/checkout from 5 to 6 #5215
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: Cargo Build, Test, and Linting | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUSTFLAGS: "-Dwarnings" | |
| jobs: | |
| format: | |
| name: Check formatting | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| toolchain: | |
| - stable | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
| - run: rustup component add rustfmt --toolchain ${{ matrix.toolchain }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo fmt --check | |
| clippy: | |
| name: Run lints | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| toolchain: | |
| - stable | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
| - run: rustup component add clippy rustfmt --toolchain ${{ matrix.toolchain }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo clippy --all-targets --all-features | |
| build_and_test: | |
| name: Build project and test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest, ubuntu-24.04-arm] | |
| toolchain: | |
| - stable | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
| - run: rustup component add rustfmt --toolchain ${{ matrix.toolchain }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo test --verbose | |
| build_release: | |
| name: Build project in release | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest, ubuntu-24.04-arm] | |
| toolchain: | |
| - stable | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
| - run: rustup component add rustfmt --toolchain ${{ matrix.toolchain }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo build --verbose --release | |
| - name: Prepare artifacts | |
| shell: bash | |
| run: | | |
| mkdir -p dist | |
| if [ "${{ runner.os }}" == "Windows" ]; then EXT=".exe"; fi | |
| cp "target/release/pumpkin$EXT" "dist/pumpkin-${{ runner.arch }}-${{ runner.os }}$EXT" | |
| - name: Export executable | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: pumpkin-${{ runner.arch }}-${{ runner.os }} | |
| compression-level: 9 | |
| path: dist/pumpkin-* | |
| clippy_release: | |
| name: Run lints in release mode | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| toolchain: | |
| - stable | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
| - run: rustup component add clippy rustfmt --toolchain ${{ matrix.toolchain }} | |
| - uses: Swatinem/rust-cache@v2 | |
| - run: cargo clippy --release --all-targets --all-features | |
| draft_release: | |
| permissions: | |
| contents: write | |
| needs: [build_release] | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download prebuilt binary artifacts | |
| uses: actions/download-artifact@v5 | |
| with: | |
| pattern: "**/pumpkin-*" | |
| path: dist/ | |
| merge-multiple: true | |
| - name: Generate release notes | |
| run: | | |
| tree dist/ | |
| echo "From commit: $(git rev-parse --short HEAD)" > dist/RELEASE.md | |
| echo "Generated on: $(date -u +"%Y-%m-%d %H:%M") UTC" >> dist/RELEASE.md | |
| cat dist/RELEASE.md | |
| - name: Update the nightly tag | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git tag --force nightly && git push --force origin tag nightly | |
| - name: Draft a nightly github release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| prerelease: true | |
| files: dist/pumpkin* | |
| tag_name: nightly | |
| name: Nightly Build | |
| body_path: dist/RELEASE.md |