diff --git a/.github/docker-build-pdf.sh b/.github/docker-build-pdf.sh index 46aab85..91bd073 100755 --- a/.github/docker-build-pdf.sh +++ b/.github/docker-build-pdf.sh @@ -142,3 +142,4 @@ to_policy_pdf succession-plan "Continuity and Administrative Access" to_policy_pdf trademark-policy "Trademark" # TODO: to_policy_pdf privacy "Privacy" +ls -al output/public \ No newline at end of file diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 88ad5cf..ef4ca73 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -10,7 +10,6 @@ on: env: GH_BOT_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com" GH_BOT_NAME: "GitHub Action" - MAIN_REPO: ${{ github.ref == 'refs/heads/main' && github.repository == 'commonhaus/foundation-draft' }} PANDOCK: ebullient/pandoc-emoji:3.1 jobs: @@ -79,23 +78,21 @@ jobs: IS_PR: ${{ github.event_name == 'pull_request' }} run: ./.github/docker-build-pdf.sh - - uses: actions/upload-artifact@v3 - if: ${{ ! env.MAIN_REPO }} + - uses: actions/upload-artifact@v4 + if: ${{ github.ref != 'refs/heads/main' }} with: - name: output - path: output/public - - - name: Git Config - run: | - git config user.name ${{ env.GH_BOT_NAME }} - git config user.email ${{ env.GH_BOT_EMAIL }} + name: pdf-output + path: output/public/*.pdf - name: Update snapshot tag - if: ${{ env.MAIN_REPO }} + if: ${{ github.ref == 'refs/heads/main' && github.repository == 'commonhaus/foundation-draft' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash run: | + git config user.name ${{ env.GH_BOT_NAME }} + git config user.email ${{ env.GH_BOT_EMAIL }} + echo "Update tag for SNAPSHOT" git push origin :refs/tags/SNAPSHOT git tag -f SNAPSHOT @@ -103,8 +100,8 @@ jobs: echo "Update SNAPSHOT release" gh release upload SNAPSHOT --clobber output/public/* + # These must be done separately to correctly toggle draft flag gh release edit SNAPSHOT -t "PDF snapshot" --prerelease gh release edit SNAPSHOT --draft=false gh release view SNAPSHOT -