Skip to content

Commit 9c3c1b8

Browse files
committed
Merge two GitHub Actions into one
Because GitHub doesn't trigger 2 workflows one based on the event of the other
1 parent 13dfcbb commit 9c3c1b8

File tree

2 files changed

+25
-24
lines changed

2 files changed

+25
-24
lines changed

Diff for: .github/workflows/npm.yml

-20
This file was deleted.

Diff for: .github/workflows/release.yml

+25-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release Build
1+
name: Release
22

33
on:
44
push:
@@ -7,11 +7,32 @@ on:
77

88
jobs:
99
build:
10-
1110
runs-on: ubuntu-latest
12-
1311
steps:
14-
- name: Create Release
12+
##################
13+
# Checkout code
14+
###################
15+
- uses: actions/checkout@v3
16+
17+
##################
18+
# Setup .npmrc file to publish to npm
19+
# install dependencies, build and push to npm
20+
###################
21+
- uses: actions/setup-node@v3
22+
with:
23+
node-version: '16.x'
24+
registry-url: 'https://registry.npmjs.org'
25+
- run: |
26+
npm install
27+
npm run build
28+
npm publish --access public
29+
env:
30+
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
31+
32+
##################
33+
# Create GitHub Release
34+
###################
35+
- name: Create release
1536
id: create_release
1637
uses: actions/create-release@v1
1738
env:

0 commit comments

Comments
 (0)