Skip to content

Commit

Permalink
Upgrade Release Process (#2015)
Browse files Browse the repository at this point in the history
* add release.yml

* upgrade docgenerator to use tags

* rm recent changes and update CHANGELOG
  • Loading branch information
cpholguera committed Dec 23, 2021
1 parent 40df8a4 commit d6308f7
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 92 deletions.
17 changes: 17 additions & 0 deletions .github/release.yml
@@ -0,0 +1,17 @@
changelog:
exclude:
labels:
- "ignore-for-release"
categories:
- title: Changes in MSTG Content
labels:
- "change-mstg"
- title: Errata Corrections (typos & more)
labels:
- "errata"
- title: New Donators
labels:
- "donation"
- title: Other Changes
labels:
- "*"
34 changes: 12 additions & 22 deletions .github/workflows/docgenerator.yml
Expand Up @@ -2,9 +2,6 @@ name: Documents Build

on: [push, workflow_dispatch]

env:
VERSION: "1.2"

jobs:

generate:
Expand All @@ -14,6 +11,13 @@ jobs:
with:
fetch-depth: 1

- name: Set VERSION to env
run: echo "VERSION=$(curl -s https://api.github.com/repos/OWASP/owasp-mstg/releases/latest | jq '.tag_name' | sed 's/\"//g')" >> $GITHUB_ENV

- name: Set DEV VERSION if it's not a tag
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
run: echo "VERSION=${{env.VERSION}}-$(git rev-parse --short HEAD)" >> $GITHUB_ENV

- name: Generate English PDF
run: ./tools/docker/pandoc_makedocs.sh Document ${{env.VERSION}}

Expand All @@ -23,20 +27,6 @@ jobs:
name: OWASP_MSTG-${{env.VERSION}}
path: OWASP_MSTG-${{env.VERSION}}*

# - name: Listing of root directory
# run: ls -l

# - name: Listing of root directory
# run: ls -l tools/

- name: Upload RECENT Changes
uses: actions/upload-artifact@v2
if: startsWith(github.ref, 'refs/tags/') && (github.actor == 'cpholguera' || github.actor == 'sushi2k')
with:
name: RECENT_CHANGES.md
path: tools/RECENT_CHANGES.md


release:
runs-on: ubuntu-latest
needs: [generate]
Expand All @@ -54,14 +44,14 @@ jobs:
run: pwd
- name: Listing of root directory
run: ls -l
# - name: Cleanup - Remove all downloaded documents
# run: rm -rf OWASP_MSTG-*/

- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: RECENT_CHANGES.md/RECENT_CHANGES.md
# body_path: RECENT_CHANGES.md
# body: 'MSTG test'
prerelease: false
draft: true
generate_release_notes: true
discussion_category_name: Announcements
files: |
OWASP_MSTG-*/OWASP_MSTG-*.pdf
OWASP_MSTG-*/OWASP_MSTG-*.epub
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog

## V1.2.1 and newer

All our Changelogs are available online at the OWASP MSTG GitHub repository, see the [Releases page](https://github.com/OWASP/owasp-mstg/releases).

## v1.2 - 25th July 2021

167 issues were closed since the last release. A full overview can be seen in Github Issues <https://github.com/OWASP/owasp-mstg/issues?q=is%3Aissue+is%3Aclosed+closed%3A2019-08-03..2021-07-25>.
Expand Down
4 changes: 4 additions & 0 deletions Document/CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog

## V1.2.1 and newer

All our Changelogs are available online at the OWASP MSTG GitHub repository, see the [Releases page](https://github.com/OWASP/owasp-mstg/releases).

## v1.2 - 25th July 2021

167 issues were closed since the last release. A full overview can be seen in Github Issues <https://github.com/OWASP/owasp-mstg/issues?q=is%3Aissue+is%3Aclosed+closed%3A2019-08-03..2021-07-25>.
Expand Down
70 changes: 0 additions & 70 deletions tools/RECENT_CHANGES.md

This file was deleted.

0 comments on commit d6308f7

Please sign in to comment.