Skip to content

Release

Release #16

Workflow file for this run

name: Release
on:
workflow_run:
workflows: [test]
types:
- completed
jobs:
release:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'master' }}
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it.
- name: Checkout Repo
id: checkout_repo
uses: actions/checkout@v4
# Gets the version from package.json and sets it as an environment variable.
- name: Set Package Version
id: set_package_version
run: echo "PACKAGE_VERSION=$(jq -r '.version' package.json)" >> $GITHUB_ENV
# Creates a release draft.
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
name: ${{ env.PACKAGE_VERSION }}
tag: ${{ env.PACKAGE_VERSION }}
commit: master
draft: true
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true
skipIfReleaseExists: true