Skip to content

release frontend

release frontend #24

name: release frontend
on:
workflow_dispatch:
inputs:
bump_version:
type: choice
description: "bump version"
default: minor
options:
# major version bumps do only manually
- minor
- patch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
jobs:
run-checks:
uses: ./.github/workflows/code-checks.yaml
with:
branch_ref: ${{ github.ref }}
release-frontend:
needs: run-checks
timeout-minutes: 20
runs-on: ubuntu-22.04
environment: release
permissions:
contents: write
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- name: Setup git user
run: |
git config --global user.name "$(git --no-pager log --format=format:'%an' -n 1)"
git config --global user.email "$(git --no-pager log --format=format:'%ae' -n 1)"
- name: Prepare Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
- name: Prepare release
run: ./bin/release-frontend.sh ${{ github.event.inputs.bump_version }}
- name: Publish package distributions to NPM
working-directory: site
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_SECRET }}