REMOVE try to merge current commit #26
Workflow file for this run
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
# Create a draft release when triggered via Github's UI or Github CLI | |
name: Prepare Release | |
on: | |
push: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'Version to release (e.g. 0.11.0)' | |
required: true | |
type: string | |
permissions: | |
contents: write | |
jobs: | |
release: | |
name: Prepare Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check version | |
run: | | |
if ! [[ '${{ '0.20' }}' =~ ^[0-9]+[.][0-9]+([.][0-9]+)?$ ]]; then | |
echo '${{ '0.20' }} does not match expected format `major.minor.patch?`' >&2 | |
exit 1 | |
fi | |
- name: Checkout | |
uses: actions/checkout@v4 | |
#with: | |
# ref: master # only create releases from main branch | |
- name: Read section from CHANGELOG.md | |
id: extract-changelog | |
uses: sean0x42/markdown-extract@v2 | |
with: | |
file: CHANGELOG.md | |
pattern: ${{ '0.20' }} | |
- name: Prepare release notes and artifacts | |
run: | | |
.github/workflows/release_prep.sh v${{ '0.20' }} > release_notes.txt | |
printf '${{ steps.extract-changelog.outputs.markdown }}' >> release_notes.txt | |
- name: Create draft release | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release create \ | |
--draft \ | |
--notes-file release_notes.txt \ | |
--title v${{ '0.20' }} \ | |
v${{ '0.20' }} \ | |
${GITHUB_REPOSITORY#*/}-${{ '0.20' }}.tar.gz | tee release_url | |
- name: Write summary | |
run: 'echo ":rocket: Draft release created [here]($( cat release_url ))" >> "${GITHUB_STEP_SUMMARY}"' |