-
Notifications
You must be signed in to change notification settings - Fork 280
37 lines (36 loc) · 1.07 KB
/
release.yml
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 semantic-release in "dry run" mode'
default: false
type: boolean
env:
NODE_OPTIONS: --max_old_space_size=4096
jobs:
release:
name: Release
runs-on: ubuntu-latest
# GH does not allow to limit branches in the workflow_dispatch settings so this here is a safety measure
if: ${{ github.ref_name == 'master' || github.ref_name == 'rc' || github.ref_name == 'release-v9' }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Validate CommonJS bundle
run: yarn validate-cjs
- name: Release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
yarn semantic-release
${{ inputs.dry_run && '--dry-run' || '' }}