Fix norelease labels #78
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
name: pr | |
on: [pull_request] | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: echo "RUST_TOOLCHAIN=$(cat ./rust-toolchain)" >> $GITHUB_ENV | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN }} | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: debug-build | |
- name: Make test | |
run: make test | |
lint: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
echo "RUST_TOOLCHAIN=$(cat ./rust-toolchain)" >> $GITHUB_ENV | |
echo "RUST_TOOLCHAIN_NIGHTLY=$(cat ./rust-toolchain-nightly)" >> $GITHUB_ENV | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN_NIGHTLY }} | |
components: rustfmt | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ env.RUST_TOOLCHAIN }} | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: debug-build-nightly | |
- name: Make lint | |
run: make lint | |
semver: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Calculate next version | |
id: calc_version | |
uses: rymndhng/release-on-push-action@master | |
with: | |
bump_version_scheme: patch | |
tag_prefix: "" | |
dry_run: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set version | |
if: ${{ steps.calc_version.outputs.version }} != "" | |
run: | | |
sed -i "s/^version = \".*\"$/version = \"${{ steps.calc_version.outputs.version }}\"/" Cargo.toml | |
- name: Commit new version to main but don't push | |
if: ${{ steps.calc_version.outputs.version }} != "" | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "MOIA Rust Maintainers" | |
git commit -am "Phantom release ${{ steps.calc_version.outputs.version }} [skip ci]" | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: semver-cache | |
- name: Check semver | |
uses: obi1kenobi/cargo-semver-checks-action@v2 | |
with: | |
version-tag-prefix: '' |