Prepare Release Draft #9
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: Prepare Release Draft | |
on: | |
workflow_dispatch: | |
inputs: | |
releaseVersion: | |
description: 'Release version (major.minor.patch)' | |
required: true | |
type: string | |
default: '' | |
jobs: | |
build-code: | |
name: Build Code | |
if: startsWith(github.ref, 'refs/heads/release/') | |
uses: ./.github/workflows/build.yml | |
with: | |
releaseVersion: ${{ inputs.releaseVersion }} | |
create-release: | |
name: Create release | |
needs: build-code | |
if: startsWith(github.ref, 'refs/heads/release/') | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: '0' | |
- name: Download Package / Artifact | |
if: ${{ inputs.releaseVersion != '' }} | |
uses: actions/download-artifact@v3 | |
with: | |
name: 'aem-msm-tools-${{ inputs.releaseVersion }}' | |
path: ./artifacts | |
- name: Create Github Release Draft | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release create ${{ inputs.releaseVersion }} --draft --generate-notes --title ${{ inputs.releaseVersion }} ./artifacts/*.zip |