diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cddd328..073ddda 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,8 @@ on: branches: - master workflow_dispatch: +env: + DIST: dist jobs: build: name: Build distribution @@ -105,14 +107,14 @@ jobs: - name: Upload distribution archive uses: actions/upload-artifact@v3 with: - name: ${{ steps.ostag.outputs.ostag }} + name: ${{ env.DIST }} path: ./*.zip - name: Upload distribution metadata if: runner.os == 'Linux' uses: actions/upload-artifact@v3 with: - name: ${{ steps.ostag.outputs.ostag }} + name: ${{ env.DIST }} path: | ./code.json ./code.md @@ -159,17 +161,11 @@ 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: ${{ steps.ostag.outputs.ostag }} - path: ${{ steps.ostag.outputs.ostag }} + name: ${{ env.DIST }} + path: ${{ env.DIST }} - name: List distribution files run: ls -l ${{ steps.ostag.outputs.ostag }} @@ -187,7 +183,7 @@ jobs: - name: Build release body run: | - cat Header.md ${{ steps.ostag.outputs.ostag }}/code.md > BodyFile.md + cat Header.md ${{ env.DIST }}/code.md > BodyFile.md cat BodyFile.md # interactive debugging @@ -200,8 +196,8 @@ jobs: id: update-readme run: | # update readme from metadata - cp ${{ steps.ostag.outputs.ostag }}/code.md code.md - cp ${{ steps.ostag.outputs.ostag }}/code.json code.json + cp ${{ env.DIST }}/code.md code.md + cp ${{ env.DIST }}/code.json code.json python scripts/update_readme.py # determine whether changes need to be committed @@ -248,7 +244,7 @@ jobs: tag: ${{ steps.next-tag.outputs.tag }} name: "MODFLOW and related programs binary executables" bodyFile: "./BodyFile.md" - artifacts: "${{ steps.ostag.outputs.ostag }}/*" + artifacts: "${{ env.DIST }}/*" draft: false allowUpdates: true token: ${{ secrets.GITHUB_TOKEN }}