preparing release v5.3.4 #177
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
name: Release System Version | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '19' | |
cache: 'npm' | |
- run: npm install | |
- run: npm run build | |
# create a zip file with all files required by the module to add to the release | |
- name: Zip Files | |
working-directory: ./ | |
run: zip -r ./system.zip ./assets ./fonts ./lang ./packs/**/* ./src ./tinymce index.js index.js.map style.css system.json template.json LICENSE.txt ChangeLog.md | |
# Get the version | |
- name: Get Version | |
shell: bash | |
id: get-version | |
run: echo "version=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
# Extract release notes from ChangeLog | |
- name: Extract release notes | |
shell: bash | |
id: extract-release-notes | |
run: | | |
OUTFILE=release-notes.md | |
utils/extract-release-notes.sh ChangeLog.md > $OUTFILE | |
echo "release_notes=$OUTFILE" >> $GITHUB_OUTPUT | |
# Create a release for this specific version | |
- name: Create Release | |
id: create_version_release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true # set this to false if you want to prevent updating existing releases | |
name: ${{ steps.get-version.outputs.version }} | |
bodyFile: ${{ steps.extract-release-notes.outputs.release_notes }} | |
draft: false | |
prerelease: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: './system.json,./system.zip,./ChangeLog.md' | |
tag: ${{ steps.get-version.outputs.version }} | |
# Update the 'latest' release | |
- name: Create Release | |
id: create_latest_release | |
uses: ncipollo/release-action@v1 | |
if: endsWith(github.event.base_ref, 'main') | |
with: | |
allowUpdates: true | |
name: Latest | |
draft: false | |
prerelease: false | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: './system.json,./system.zip,./ChangeLog.md' | |
tag: latest |