add release draft workflow #5
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: Create release draft | |
| on: | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| branches: | |
| - "master" | |
| - "mx8" | |
| - "compliance" | |
| jobs: | |
| build-module: | |
| uses: ./.github/workflows/build-module.yml | |
| secrets: inherit | |
| build-widget: | |
| uses: ./.github/workflows/build-widget.yml | |
| secrets: inherit | |
| checks: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-module | |
| - build-widget | |
| if: ${{ needs.build-module.outputs.module-version != needs.build-widget.outputs.widget-version }} | |
| steps: | |
| - run: | | |
| echo "Module version (${{ needs.build-module.outputs.module-version }}) and widget version ${{ needs.build-widget.outputs.widget-version }}) do not match" | |
| exit 1 | |
| - uses: trstringer/manual-approval@662b3ddbc7685f897992051e87e1b4b58c07dc03 # 1.9.1 | |
| with: | |
| secret: ${{ github.TOKEN }} | |
| approvers: ui-addons | |
| minimum-approvals: 1 | |
| issue-title: "Prepare documentation" | |
| issue-body: "Is the documentation for this release prepared?" | |
| download-artifacts: | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build-module | |
| - build-widget | |
| steps: | |
| - uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # 4.2.1 | |
| with: | |
| name: module | |
| - uses: actions/download-artifact@95815c38cf2ff2164869cbab79da8d1f422bc89e # 4.2.1 | |
| with: | |
| name: widget | |
| create-draft-release: | |
| needs: | |
| - checks | |
| - download-artifacts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: softprops/action-gh-release@c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda # 2.2.1 | |
| with: | |
| body_path: CHANGELOG.md | |
| draft: true | |
| files: "*.mpk" | |
| fail_on_unmatched_files: true | |
| generate_release_notes: false | |
| make_latest: ${{ github.ref_name == 'master' }} |