Skip to content

build(releases): add semantic-release and action #13

build(releases): add semantic-release and action

build(releases): add semantic-release and action #13

Workflow file for this run

name: Publish
on:
release:
types: [published]
push:
branches: ["add-semantic-release"]
workflow_dispatch:
inputs:
dryRun:
# description: semantic-release params (e.g. --dry-run)
type: choice
default: ""
options:
- --dry-run
- ""
jobs:
build:
name: Build and publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Install semantic-release extra plugins
run: npm install --save-dev @semantic-release/changelog @semantic-release/git
- name: Install
run: yarn
- name: Build
run: yarn build
- name: Publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.CERN_SIS_NPM }}
run: npx semantic-release ${{ inputs.dryRun }}