forked from mishk0/slack-bot-api
-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (36 loc) · 1.05 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:
push:
branches:
- master
pull_request:
branches:
- master
types:
- closed
jobs:
run:
runs-on: ubuntu-latest
if: github.event.pull_request.merged == true || startsWith(github.event.head_commit.message, ':bookmark:')
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
- name: Cache target
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache
uses: actions/cache@v1
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: ${{ runner.os }}-yarn-
- run: yarn install
- run: yarn build
- name: Publish
run: |
npm set registry --scope=@getdelta https://npm.pkg.github.com/getdelta
npm set //npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}
yarn publish --non-interactive