Release #81
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: | |
bump: | |
type: choice | |
description: 'Bump version' | |
required: true | |
default: patch | |
options: | |
- patch | |
- minor | |
- major | |
dry_run: | |
type: boolean | |
description: 'Dry run' | |
required: true | |
default: false | |
draft: | |
type: boolean | |
description: 'Draft release' | |
required: true | |
default: false | |
concurrency: | |
group: ${{ github.event.repository.name }}-release | |
cancel-in-progress: true | |
jobs: | |
release: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Prepare Git | |
id: prepare-git | |
shell: bash | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
cache: npm | |
check-latest: true | |
node-version-file: .nvmrc | |
- name: Install dependencies | |
run: npm ci | |
- name: Bumb version | |
id: version | |
run: | | |
npm version ${{ github.event.inputs.bump }} | |
echo "new_tag=$(git describe --tags --abbrev=0 | sed 's/v//')" >> $GITHUB_OUTPUT | |
- name: Make | |
run: | | |
chmod +x add-osx-cert.sh && ./add-osx-cert.sh | |
npm run make | |
env: | |
NOT_SIGN: ${{ github.event.inputs.dry_run }} | |
APPLE_ID: ${{ secrets.APPLE_ID }} | |
APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }} | |
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} | |
CERTIFICATE_OSX_APPLICATION: ${{ secrets.CERTIFICATE_OSX_APPLICATION }} | |
CERTIFICATE_PASSWORD: ${{ secrets.CERTIFICATE_PASSWORD }} | |
- name: Generate changelog | |
id: changelog | |
uses: mathieudutour/[email protected] | |
with: | |
custom_tag: ${{ steps.version.outputs.new_tag }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
dry_run: 'true' | |
- name: Push changes and tags | |
if: github.event.inputs.dry_run != 'true' | |
run: | | |
git push | |
- name: Create a GitHub release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: v${{ steps.version.outputs.new_tag }} | |
name: Release v${{ steps.version.outputs.new_tag }} | |
body: ${{ steps.changelog.outputs.changelog }} | |
artifacts: 'out/**/*.zip' | |
draft: ${{ github.event.inputs.draft }} |