-
Notifications
You must be signed in to change notification settings - Fork 159
38 lines (36 loc) · 1.11 KB
/
publish-on-tag.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
38
name: publish-on-tag
on:
push:
tags:
- '*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Test
run: npm test
- name: Publish punycode package
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN_PUNYCODE}}
run: |
npm config set registry 'https://wombat-dressing-room.appspot.com/'
npm config set '//wombat-dressing-room.appspot.com/:_authToken' '${NPM_TOKEN}'
npm publish
- name: Publish punycode.js package
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN_PUNYCODE_JS}}
run: |
sed -i 's/"name": "punycode"/"name": "punycode.js"/' package.json
npm config set registry 'https://wombat-dressing-room.appspot.com/'
npm config set '//wombat-dressing-room.appspot.com/:_authToken' '${NPM_TOKEN}'
npm publish