Skip to content

Commit 219607f

Browse files
committed
ci: run github-packages in different workflow on release
1 parent 5c89471 commit 219607f

File tree

2 files changed

+34
-25
lines changed

2 files changed

+34
-25
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: publish github packages
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish-gpr:
9+
runs-on: ubuntu-18.04
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Setup Node
14+
uses: actions/setup-node@v1
15+
with:
16+
node-version: '12.x'
17+
registry-url: 'https://npm.pkg.github.com'
18+
scope: '@Pyrax'
19+
20+
- name: Cache dependencies
21+
uses: actions/cache@v2
22+
with:
23+
path: ~/.yarn
24+
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
25+
restore-keys: |
26+
${{ runner.os }}-node-
27+
- run: yarn install --frozen-lockfile
28+
29+
- name: Autoscope package.json
30+
uses: khaazz/action-autoscope@master
31+
32+
- run: yarn publish --registry=https://npm.pkg.github.com/Pyrax
33+
env:
34+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -38,28 +38,3 @@ jobs:
3838
env:
3939
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4040
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
41-
github-packages-release:
42-
needs: semantic-release
43-
runs-on: ubuntu-18.04
44-
steps:
45-
- uses: actions/checkout@v2
46-
47-
- name: Setup Node
48-
uses: actions/setup-node@v1
49-
with:
50-
node-version: '12.x'
51-
registry-url: 'https://npm.pkg.github.com'
52-
scope: '@Pyrax'
53-
54-
- name: Cache dependencies
55-
uses: actions/cache@v2
56-
with:
57-
path: ~/.yarn
58-
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
59-
restore-keys: |
60-
${{ runner.os }}-node-
61-
- run: yarn install --frozen-lockfile
62-
63-
- run: yarn publish --registry=https://npm.pkg.github.com
64-
env:
65-
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)