nix via inputs and bump to 1.21 #87
Workflow file for this run
This file contains 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
on: | |
push: | |
branches: [main] | |
pull_request: | |
jobs: | |
test: | |
strategy: | |
matrix: | |
runner: [ubuntu-latest, macos-latest] | |
runs-on: ${{ matrix.runner }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@main | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: test | |
run: nix shell --command cargo test | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@main | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: clippy | |
run: nix shell --command cargo clippy --all-targets -- --deny warnings | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@main | |
- uses: DeterminateSystems/magic-nix-cache-action@main | |
- name: fmt | |
run: nix shell --command cargo fmt --check | |
release: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
permissions: | |
pull-requests: write | |
contents: write | |
needs: [test, clippy, fmt] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: google-github-actions/release-please-action@v4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
release-type: rust |