Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): fix release tagging #10

Merged
merged 1 commit into from
Nov 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
ci: fix release version auto-increment
  • Loading branch information
wpbonelli committed Nov 23, 2022
commit 5db3b1ac66003a609e1e970a543f92f55d4ffc22
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