Bump actions/download-artifact from v2 to v4 in /.github/workflows (#… #1038
This file contains 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: MASVS Build | |
on: [push, workflow_dispatch] | |
jobs: | |
Generate-MASVS-Documents: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Set MASVS_VERSION to env | |
run: echo "MASVS_VERSION=$(curl -s https://api.github.com/repos/OWASP/owasp-masvs/tags | jq '.[0].name' | sed 's/\"//g')" >> $GITHUB_ENV | |
- name: Set DEV MASVS_VERSION if it's not a tag | |
if: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
run: echo "MASVS_VERSION=${{env.MASVS_VERSION}}-$(git rev-parse --short HEAD)" >> $GITHUB_ENV | |
- name: Get Latest MASTG Release Tag | |
run: echo "MASTG_VERSION=$(curl -s https://api.github.com/repos/OWASP/owasp-mastg/releases/latest | jq '.tag_name' | sed 's/\"//g')" >> $GITHUB_ENV | |
- name: Generate MASVS yaml | |
run: python3 ./tools/generate_masvs_yaml.py -v ${{ env.MASVS_VERSION }} | |
- name: Populate MASVS Categories Markdown Files | |
run: python3 ./tools/populate_masvs_categories_md.py | |
- name: Generate PDF and ePub | |
run: ./tools/docker/pandoc_makedocs.sh Document ${{ env.MASVS_VERSION }} ${{ env.MASTG_VERSION }} | |
- name: Generate CycloneDX JSON | |
run: python3 ./tools/generate_masvs_cyclonedx.py | |
- name: Generate SARIF | |
run: python3 ./tools/generate_masvs_sarif.py | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: OWASP_MASVS | |
path: OWASP_MASVS* | |
release: | |
runs-on: ubuntu-latest | |
needs: [Generate-MASVS-Documents] | |
if: startsWith(github.ref, 'refs/tags/') && (github.actor == 'cpholguera' || github.actor == 'sushi2k') | |
steps: | |
- uses: actions/download-artifact@v4 | |
- name: Move all files to the root folder | |
run: mv OWASP_MASVS*/* . | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
prerelease: false | |
draft: true | |
generate_release_notes: true | |
discussion_category_name: Announcements | |
files: | | |
OWASP_MASVS.pdf | |
OWASP_MASVS.epub | |
OWASP_MASVS.yaml | |
OWASP_MASVS.cdx.json | |
OWASP_MASVS.sarif | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |