Skip to content

Create Release

Create Release #24

name: Create Release
on:
workflow_dispatch:
inputs:
versionName:
description: 'Semantic Version Number (i.e., 5.5.0 or patch, minor, major, prepatch, preminor, premajor, prerelease)'
required: true
default: patch
preid:
description: 'Pre Release Identifier (i.e., alpha, beta)'
required: true
default: alpha
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
with:
ref: main
ssh-key: ${{ secrets.PRIVATE_SSH_KEY }}
- name: Reset main branch
run: |
git fetch origin dev:dev
git reset --hard origin/dev
- name: Change version number
id: version
run: |
echo "next_tag=$(npm version --no-git-tag-version ${{ github.event.inputs.versionName }} --preid ${{ github.event.inputs.preid }})" >> $GITHUB_OUTPUT
- name: Create pull request into main
uses: peter-evans/create-pull-request@v4
with:
branch: release/${{ steps.version.outputs.next_tag }}
commit-message: 'chore: release ${{ steps.version.outputs.next_tag }}'
base: main
title: Release ${{ steps.version.outputs.next_tag }}
labels: chore
assignees: sgratzl
body: |
Releasing ${{ steps.version.outputs.next_tag }}.