Release #173
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 | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
required: true | |
description: 'Release version' | |
jobs: | |
release_pr: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- name: Fetch files and checkout | |
run: | | |
git fetch --all | |
git checkout releases | |
git checkout main . | |
- name: Build release | |
run: | | |
npm ci | |
npm run build | |
- name: Check in files | |
run: | | |
git add -f build/ Sources/ | |
- name: Commit build files | |
uses: stefanzweifel/git-auto-commit-action@v4 | |
with: | |
commit_message: "Release build ${{ github.event.inputs.version }} [ci release]" | |
commit_options: '--allow-empty' | |
skip_checkout: true | |
branch: "releases" | |
- name: Collect commit ranges | |
run: | | |
bash ./scripts/changelog.sh > ${{ github.workspace }}-CHANGELOG.txt | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
body_path: ${{ github.workspace }}-CHANGELOG.txt | |
draft: false | |
prerelease: false | |
tag_name: ${{ github.event.inputs.version }} | |
target_commitish: "releases" |