-
Notifications
You must be signed in to change notification settings - Fork 216
41 lines (40 loc) · 1.13 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
38
39
40
41
name: release
on:
workflow_dispatch:
repository_dispatch:
types: [release]
jobs:
release:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: actions/setup-node@v1
with:
node-version: 14
- name: Install dependencies
run: |
npm i -g npm@latest
npm ci
npm link
env:
CI: true
- run: npx semantic-release
if: success()
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# Need owner/admin account to bypass branch protection
GIT_COMMITTER_NAME: ci-rebot
GIT_COMMITTER_EMAIL: [email protected]
- name: Configure git
run: |
git config --global user.name "ci-rebot"
git config --global user.email "[email protected]"
- name: Deploy starter-kit updates
run: npm run deploy
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}