Skip to content

Commit

Permalink
allow norelease
Browse files Browse the repository at this point in the history
  • Loading branch information
rinde committed Apr 2, 2024
1 parent 1c106b0 commit 8ad6372
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,14 @@ jobs:
echo "bump_version=major" >> $GITHUB_OUTPUT
elif [ ${{contains( github.event.pull_request.labels.*.name, 'release:minor')}} ]; then
echo "bump_version=minor" >> $GITHUB_OUTPUT
elif [ ${{contains( github.event.pull_request.labels.*.name, 'norelease')}} ]; then
echo "bump_version=" >> $GITHUB_OUTPUT
else
echo "bump_version=patch" >> $GITHUB_OUTPUT
fi
- name: Calculate next version
id: calc_version
if: ${{ steps.extract_version_bump.outputs.bump_version }} != ""
uses: rymndhng/release-on-push-action@master
with:
bump_version_scheme: ${{ steps.extract_version_bump.outputs.bump_version }}
Expand All @@ -70,16 +73,17 @@ jobs:
echo "${{ steps.extract_version_bump.outputs.bump_version }}"
echo "${{toJson(github.event.pull_request.labels.*.name)}}"
- name: Set version
if: ${{ steps.calc_version.outputs.version }} != ""
if: ${{ steps.extract_version_bump.outputs.bump_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 }} != ""
if: ${{ steps.extract_version_bump.outputs.bump_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]"
- name: Check semver
if: ${{ steps.extract_version_bump.outputs.bump_version }} != ""
uses: obi1kenobi/cargo-semver-checks-action@v2
with:
version-tag-prefix: ''

0 comments on commit 8ad6372

Please sign in to comment.