Skip to content

Commit 473a46f

Browse files
author
TANGUY Antoine
committed
ci: automate package release
1 parent 8f03abe commit 473a46f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Node.js Package
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
packages: write
11+
steps:
12+
- uses: actions/checkout@v2
13+
# Setup .npmrc file to publish to npm
14+
- uses: actions/setup-node@v2
15+
with:
16+
node-version: '14'
17+
registry-url: 'https://registry.npmjs.org'
18+
- run: npm install
19+
- run: npm publish --access public
20+
env:
21+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
22+
# Setup .npmrc file to publish to GitHub Packages
23+
- uses: actions/setup-node@v2
24+
with:
25+
registry-url: 'https://npm.pkg.github.com'
26+
scope: '@sendinblue'
27+
# Publish to GitHub Packages
28+
- run: npm publish
29+
env:
30+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)