-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (33 loc) · 1.02 KB
/
publish.yml
File metadata and controls
41 lines (33 loc) · 1.02 KB
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: Publish
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
timeout-minutes: 1
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Create .npmrc file
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
echo "@internxt:registry=https://npm.pkg.github.com/" > .npmrc
echo "//npm.pkg.github.com/:_authToken=$GITHUB_TOKEN" >> .npmrc
- name: Publish package to github
run: npm publish --scope=@internxt --access public
- name: Create .npmrc file
shell: bash
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "registry=https://registry.npmjs.org/" > .npmrc
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> .npmrc
- name: Publish package to npm
run: npm publish --scope=@internxt --access public