update workflow pipeline for latest actions #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release docs | |
| # checks are only on the draft directory because the release directory will be overwritten | |
| on: | |
| push: | |
| # tagged x.x.x releases as well as release candidates | |
| tags: | |
| - ?.?.?* | |
| workflow_dispatch: | |
| # for security reasons the github actions are pinned to specific release versions | |
| jobs: | |
| export_pdf: | |
| name: Export PDF | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout markdown | |
| uses: actions/checkout@v6.0.2 | |
| - name: Install python | |
| uses: actions/setup-python@v6.2.0 | |
| with: | |
| python-version: 3.x | |
| - name: Install python packages | |
| run: | | |
| python -m pip install --upgrade pip setuptools wheel | |
| pip install mkdocs | |
| pip install mkdocs-material | |
| pip install mkdocs-open-in-new-tab | |
| pip install mkdocs-redirects | |
| pip install mkdocs-with-pdf | |
| - name: Build | |
| run: mkdocs build | |
| - name: Upload PDF | |
| uses: actions/upload-artifact@v7.0.0 | |
| with: | |
| name: 'pdf-export' | |
| path: 'site/OWASP_Developer_Guide.pdf' | |
| draft_release: | |
| name: Create draft release | |
| runs-on: ubuntu-24.04 | |
| needs: [export_pdf] | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v6.0.2 | |
| - name: Fetch prepared SBOM artifacts | |
| uses: actions/download-artifact@v8.0.0 | |
| with: | |
| name: 'pdf-export' | |
| path: 'site/OWASP_Developer_Guide.pdf' | |
| - name: Prepare release notes | |
| run: | | |
| releaseVersion=${{ github.ref_name }} | |
| sed -e s/x.x.x/${releaseVersion:1}/g .release-note-template.md > ./release-notes.txt | |
| - name: Create release notes | |
| uses: softprops/action-gh-release@v2.5.0 | |
| with: | |
| draft: true | |
| name: "${releaseVersion:1}" | |
| append_body: true | |
| body_path: ./release-notes.txt | |
| generate_release_notes: true | |
| files: | | |
| site/OWASP_Developer_Guide.pdf |