Skip to content

Commit e275a20

Browse files
committed
Try: release pro package to github packages
1 parent c504bc1 commit e275a20

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Publish to GitHub Packages
2+
3+
on:
4+
push:
5+
branches:
6+
- "private-*"
7+
8+
jobs:
9+
publish-npm:
10+
runs-on: ubuntu-latest
11+
12+
permissions:
13+
contents: read
14+
packages: write # Required to publish using GITHUB_TOKEN
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Setup Node.js with GitHub Packages auth
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: 22.11.0
24+
registry-url: https://npm.pkg.github.com/
25+
26+
- name: Configure .npmrc for Gemfury (for install only)
27+
run: |
28+
echo "@iconscout:registry=https://npm-proxy.fury.io/iconscout/" > .npmrc
29+
echo "//npm-proxy.fury.io/iconscout/:_authToken=${FURY_AUTH_TOKEN}" >> .npmrc
30+
env:
31+
FURY_AUTH_TOKEN: ${{ secrets.FURY_AUTH_TOKEN }}
32+
33+
- name: Install dependencies from Gemfury
34+
run: npm ci --progress=false
35+
env:
36+
NPM_CONFIG_USERCONFIG: ${{ github.workspace }}/.npmrc
37+
38+
- name: Build package
39+
run: |
40+
npm i @iconscout/unicons@latest
41+
npm run generate
42+
env:
43+
NPM_CONFIG_USERCONFIG: ${{ github.workspace }}/.npmrc
44+
45+
- name: Restore GitHub registry config for publish
46+
run: rm .npmrc
47+
48+
- name: Publish to GitHub Packages
49+
run: npm publish
50+
env:
51+
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)