Skip to content

Commit

Permalink
ci: fix release version auto-increment (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
wpbonelli authored Nov 27, 2022
1 parent 9cc50a8 commit 1f2988b
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,13 @@ jobs:

- name: Set latest release tag as a environment variable
run: |
echo "RELEASE_VERSION=${{ steps.executables.outputs.tag }}" >> $GITHUB_ENV
v=`echo "${{ steps.executables.outputs.tag }} + 1.0" | bc`
echo "NEXT_VERSION=$v" >> $GITHUB_ENV
echo "MODFLOW-USGS/executables current version is $RELEASE_VERSION"
echo "MODFLOW-USGS/executables next version is $NEXT_VERSION"
current="${{ steps.executables.outputs.tag }}"
# next="${current%.*}.$((${current##*.}+1))"
next=$(echo "${{ steps.executables.outputs.tag }} + 1.0" | bc)
echo "RELEASE_VERSION=$current" >> $GITHUB_ENV
echo "NEXT_VERSION=$next" >> $GITHUB_ENV
echo "MODFLOW-USGS/executables current version is $current"
echo "MODFLOW-USGS/executables next version is $next"
- name: Download a Build Artifact
uses: actions/[email protected]
Expand Down Expand Up @@ -215,13 +217,12 @@ jobs:
cat Header.md ./release_build/code.md > BodyFile.md
cat BodyFile.md
rm ./release_build/code.md
- name: Create a Release
if: github.event_name == 'push'
uses: ncipollo/[email protected]
with:
tag: $NEXT_VERSION
tag: ${{ env.NEXT_VERSION }}
name: "MODFLOW and related programs binary executables"
bodyFile: "./BodyFile.md"
artifacts: "./release_build/*"
Expand Down

0 comments on commit 1f2988b

Please sign in to comment.