Skip to content

Commit

Permalink
updated publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
amalcaraz committed Feb 26, 2023
1 parent a595926 commit 328972f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,24 @@ jobs:
with:
fetch-depth: 0

- name: Install deps and build
uses: actions/setup-node@v3
run: |
npm config set "@fortawesome:registry" https://npm.fontawesome.com/
npm config set "//npm.fontawesome.com/:_authToken" FONTAWESOME_NPM_AUTH_TOKEN
npm ci
npm run build
env:
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}

- name: "Publish package"
- name: "Setup node"
uses: actions/setup-node@v3
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'
scope: '@aleph-front'
run: |
npm publish --ignore-scripts --access public

- name: "Prepare npmrc"
run: envsubst < .npmrc_ci > .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
FONTAWESOME_NPM_AUTH_TOKEN: ${{ secrets.FONTAWESOME_NPM_AUTH_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN}}

- name: "Install deps"
run: npm ci

- name: "Build"
run: npm run build

- name: "Publish package"
run: npm publish --ignore-scripts --access public
6 changes: 6 additions & 0 deletions .npmrc_ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
always-auth = true
@fortawesome:registry=https://npm.fontawesome.com/
@aleph-front:registry=https://registry.npmjs.org/

//npm.fontawesome.com/:_authToken=${FONTAWESOME_NPM_AUTH_TOKEN}
//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}

0 comments on commit 328972f

Please sign in to comment.