-
Notifications
You must be signed in to change notification settings - Fork 465
67 lines (63 loc) · 1.91 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# base - .github/workflows/publish.yml - beg
# Publishing packages to npm and GitHub Packages
# https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#publishing-packages-to-npm-and-github-packages
name: publish
on:
release:
types: [created]
workflow_dispatch:
jobs:
job1:
strategy:
matrix:
architecture:
# - arm64
- x64
# - x86
node_version:
- 20
# - 22
os:
# - macos-latest
- ubuntu-latest
# - windows-latest
name: >
job1
node
v${{ matrix.node_version }}
${{ matrix.architecture }}
${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
contents: read
packages: write
steps:
# Setup .npmrc file to publish to GitHub Packages
- run: rm -f /home/runner/work/_temp/.npmrc
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
architecture: ${{ matrix.architecture }}
registry-url: 'https://npm.pkg.github.com'
# Defaults to the user or organization that owns the workflow file
# scope: '@octocat'
# Publish to GitHub Packages
- run: sh jslint_ci.sh shCiPublishNpm
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_REGISTRY: github
# Setup .npmrc file to publish to npm
- run: rm -f /home/runner/work/_temp/.npmrc
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}
architecture: ${{ matrix.architecture }}
registry-url: 'https://registry.npmjs.org'
# Publish to npm
- run: sh jslint_ci.sh shCiPublishNpm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_REGISTRY: npm
# base - .github/workflows/publish.yml - end