Skip to content

Release

Release #9

Workflow file for this run

# from node-osc package
# This is a basic workflow that is manually triggered
name: Release
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
version:
# Friendly description to be shown in the UI instead of 'name'
description: 'Semver type of new version (major / minor / patch)'
# Input has to be provided for the workflow to run
required: true
type: choice
options:
- patch
- minor
- major
# 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 "bump-version"
bump-version:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Check out the content (source branch). Use a deploy key so that
# when we push changes, it will trigger the release workflow
# run that runs on: tag. (Using the GitHub token would
# not run the workflow to prevent infinite recursion.)
- name: Check out source
uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.ARCHDOC_RELEASE_DEPLOY_KEY }}
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install yarn dependencies
run: yarn install --immutable
- name: Setup Git
run: |
git config user.name 'ARCHDOC RELEASE WORKFLOW'
- name: bump version
run: npx standard-version --release-as ${{ github.event.inputs.version }}
- name: Push latest version
run: git push origin main --follow-tags