diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 8d79d11..1005de0 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -135,7 +135,7 @@ jobs: if: runner.os == 'Linux' uses: actions/upload-artifact@v3 with: - name: metadata + name: ${{ steps.ostag.outputs.ostag }} path: | ./code.json ./code.md diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 58ca29f..0228996 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -112,7 +112,7 @@ jobs: if: runner.os == 'Linux' uses: actions/upload-artifact@v3 with: - name: ${{ env.DIST }} + name: ${{ steps.ostag.outputs.ostag }} path: | ./code.json ./code.md @@ -158,14 +158,20 @@ jobs: echo "$repo current version is $current" echo "$repo next version is $next" + - name: Get OS tag + id: ostag + run: | + ostag=$(python -c "from modflow_devtools.ostags import get_ostag; print(get_ostag())") + echo "ostag=$ostag" >> $GITHUB_OUTPUT + - name: Download distribution uses: actions/download-artifact@v3 with: - name: ${{ env.DIST }} - path: ${{ env.DIST }} + name: ${{ steps.ostag.outputs.ostag }} + path: ${{ steps.ostag.outputs.ostag }} - name: List distribution files - run: ls -l ${{ env.DIST }} + run: ls -l ${{ steps.ostag.outputs.ostag }} - name: Create release body header shell: python @@ -180,7 +186,7 @@ jobs: - name: Build release body run: | - cat Header.md ${{ env.DIST }}/code.md > BodyFile.md + cat Header.md ${{ steps.ostag.outputs.ostag }}/code.md > BodyFile.md cat BodyFile.md # interactive debugging @@ -193,8 +199,8 @@ jobs: id: update-readme run: | # update readme from metadata - cp ${{ env.DIST }}/code.md code.md - cp ${{ env.DIST }}/code.json code.json + cp ${{ steps.ostag.outputs.ostag }}/code.md code.md + cp ${{ steps.ostag.outputs.ostag }}/code.json code.json python scripts/update_readme.py # determine whether changes need to be committed @@ -241,7 +247,7 @@ jobs: tag: ${{ steps.next-tag.outputs.tag }} name: "MODFLOW and related programs binary executables" bodyFile: "./BodyFile.md" - artifacts: "${{ env.DIST }}/*" + artifacts: "${{ steps.ostag.outputs.ostag }}/*" draft: false allowUpdates: true token: ${{ secrets.GITHUB_TOKEN }}