name: Pre-release
on:
push:
branches: [ master ]
jobs:
pre-release:
name: Pre Release
runs-on: ubuntu-latest
permissions:
id-token: write pull-requests: write
contents: write
steps:
- uses: actions/checkout@v6
with:
show-progress: false
fetch-depth: 0
- name: Get date
run: |
echo "TODAY_DATE=$(date -Idate)" >> "$GITHUB_ENV"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Cache Toolchain
uses: actions/cache@v4
with:
path: ~/.rustup
key: toolchain-x86-64-nightly-${{ env.TODAY_DATE }}
- name: Install `nightly` Toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: rustfmt,clippy
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1
- name: Install cargo-hack
uses: baptiste0928/cargo-install@v3
with:
crate: cargo-hack
version: "^0.5"
- name: Cargo check all targets and features
run: cargo hack check --workspace --each-feature --all-targets
- name: Cargo Test
run: cargo test --workspace --all-features --lib --bins --tests --examples
- name: Run release-plz
uses: MarcoIeni/release-plz-action@v0.5
with:
command: release-pr
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}