Skip to content

Commit eb4b40a

Browse files
committed
ci(actions): fix publish action env setting
1 parent e726c04 commit eb4b40a

File tree

1 file changed

+7
-23
lines changed

1 file changed

+7
-23
lines changed

.github/workflows/publish.yml

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ jobs:
2929
- name: Validate TypeScript Types
3030
run: npm run validate-types
3131

32-
# Publish the release to the public NPM registry.
33-
publish-public:
32+
# Publish the release to the public NPM registry and the private FontAwesome Pro registry.
33+
publish-packages:
3434
name: Publish to Public NPM Registry
3535
runs-on: ubuntu-latest
3636
needs: validate
37+
env:
38+
NPM_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
39+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
40+
CLOUDSMITH_TOKEN: ${{ secrets.CLOUDSMITH_PUBLISH_TOKEN }}
3741
steps:
3842
- name: Checkout Code
3943
uses: actions/checkout@v6
@@ -57,28 +61,8 @@ jobs:
5761
- name: Publish Release on NPM
5862
run: npm publish --tag latest --registry=https://registry.npmjs.org/
5963

60-
# Publish the release to the private FontAwesome Pro registry.
61-
publish-private:
62-
name: Publish to FontAwesome Pro Registry
63-
runs-on: ubuntu-latest
64-
needs: validate
65-
steps:
66-
- name: Checkout Code
67-
uses: actions/checkout@v6
68-
with:
69-
ref: main # Since the prior publish step will have pushed a new release tag, we need to ensure we are on the main branch to avoid issues with detached HEAD state.
70-
71-
- name: Setup Node.js 22.x
72-
uses: actions/setup-node@v6
73-
with:
74-
node-version: 22.x
75-
registry-url: 'https://npm.fontawesome.com/'
76-
cache: 'npm'
77-
7864
- name: Authenticate with FontAwesome Pro Registry
79-
env:
80-
TOKEN: ${{ secrets.CLOUDSMITH_PUBLISH_TOKEN }}
81-
run: echo "//npm.fontawesome.com/:_authToken=${TOKEN}" > ./.npmrc
65+
run: echo "//npm.fontawesome.com/:_authToken=${CLOUDSMITH_TOKEN}" > ./.npmrc
8266

8367
- name: Publish Release on FontAwesome Pro Registry
8468
run: npm publish --tag latest --registry=https://npm.fontawesome.com/

0 commit comments

Comments
 (0)