Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
check the version against the highest released version
Browse files Browse the repository at this point in the history
  • Loading branch information
marten-seemann committed Aug 11, 2021
1 parent 1000984 commit 5044237
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
runs-on: ubuntu-latest
env:
VERSION: ""
HIGHESTRELEASED: ""
steps:
- uses: actions/checkout@v2
with:
Expand All @@ -31,7 +32,10 @@ jobs:
- uses: actions/checkout@v2
- name: Determine version
run: echo "VERSION=$(jq -r .version version.json)" >> $GITHUB_ENV
- name: Check if this is a new version
run: echo "HIGHESTRELEASED=$(go list -m -versions | tr " " "\n" | tail -n 1)" >> $GITHUB_ENV
- name: "check suggested version against gorelease"
if: ${{ env.VERSION != env.HIGHESTRELEASED }}
run: |
suggested=$(gorelease | grep Suggested | sed "s/Suggested version: //")
echo "gorelease suggested: $suggested"
Expand All @@ -41,7 +45,7 @@ jobs:
exit 1
fi
- name: Create release
if: ${{ github.event_name == 'push' }}
if: ${{ github.event_name == 'push' && env.VERSION != env.HIGHESTRELEASED }}
run: |
git tag ${{ env.VERSION }}
git push --tags

0 comments on commit 5044237

Please sign in to comment.