Skip to content

Release the Kraken! πŸ™ #322

Release the Kraken! πŸ™

Release the Kraken! πŸ™ #322

Workflow file for this run

# This is a basic workflow that is manually triggered
name: Release the Kraken! πŸ™
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
release_type:
# Release type
description: 'Release type, major | minor | patch'
default: 'minor'
required: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "greet"
release:
runs-on: ubuntu-latest
# The type of runner that the job will run on
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Runs a single command using the runners shell
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT }}
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 18.12
- name: 'Determine Release Type'
run: |
if ${{ contains(github.event.inputs.release_type, 'major') }}; then
echo "RELEASE_TYPE=major" >> $GITHUB_ENV
elif ${{ contains(github.event.inputs.release_type, 'minor') }}; then
echo "RELEASE_TYPE=minor" >> $GITHUB_ENV
elif ${{ contains(github.event.inputs.release_type, 'patch') }}; then
echo "RELEASE_TYPE=patch" >> $GITHUB_ENV
else
echo "NOTE: There was no release type specified in the commit message, and therefore no release will be published."
exit 1
fi
- name: 'Release Type'
run: echo ${{ env.RELEASE_TYPE }}
- name: git config
run: |
git config user.name ${{ github.actor }}
- name: release version
run: npx release-it -- ${{ env.RELEASE_TYPE }} --ci
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
- name: Merge dev -> main
run: |
git status
git pull
git fetch
git checkout main
git rebase dev
git push origin main
git status