-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 925 Bytes
/
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
name: Release
on:
push:
branches:
- main
- next
concurrency:
group: release-${{ github.ref }}-1
cancel-in-progress: true
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
persist-credentials: false
token: ${{ secrets.GH_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm ci --legacy-peer-deps
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v5.2
- name: Release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release --branches ${{ steps.branch-name.outputs.current_branch }}