-
Notifications
You must be signed in to change notification settings - Fork 294
37 lines (33 loc) · 1.05 KB
/
release.yml
File metadata and controls
37 lines (33 loc) · 1.05 KB
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
32
33
34
35
36
37
name: Release
on:
workflow_dispatch:
inputs:
dry_run:
description: Run package release in "dry run" mode (does not publish)
default: false
type: boolean
permissions:
id-token: write # Required for OIDC
contents: write
issues: write
pull-requests: write
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' || '' }}