-
Notifications
You must be signed in to change notification settings - Fork 298
31 lines (28 loc) · 966 Bytes
/
release.yml
File metadata and controls
31 lines (28 loc) · 966 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: Release
on:
workflow_dispatch:
inputs:
dry_run:
description: Run package release in "dry run" mode (does not publish)
default: false
type: boolean
jobs:
package_release:
name: Release from "${{ github.ref_name }}" branch
runs-on: ubuntu-latest
# GH does not allow to limit branches in the workflow_dispatch settings so this here is a safety measure
if: ${{ inputs.dry_run || startsWith(github.ref_name, 'release') || startsWith(github.ref_name, 'master') || startsWith(github.ref_name, 'rc')}}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup-node
- name: Release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.DOCUSAURUS_GH_TOKEN }}
HUSKY: 0
run: >
yarn semantic-release
${{ inputs.dry_run && '--dry-run' || '' }}