forked from olahol/iso-3166-2.js
-
Notifications
You must be signed in to change notification settings - Fork 1
44 lines (41 loc) · 1015 Bytes
/
publish.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
39
40
41
42
43
44
name: Publish
on:
workflow_dispatch:
inputs:
version:
required: true
type: choice
options:
- prerelease
- patch
- minor
- major
jobs:
npm:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_TOKEN }}
- uses: actions/setup-node@v4
with:
cache: npm
node-version-file: .nvmrc
registry-url: https://npm.pkg.github.com/
scope: '@mapquest'
- name: Run git config
run: |
git config user.name GitHub
git config user.email [email protected]
- run: npm version ${{ github.event.inputs.version }}
- run: git push origin main --follow-tags
- run: npm ci
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run npm publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}