Skip to content

Commit

Permalink
publish action changes
Browse files Browse the repository at this point in the history
  • Loading branch information
amalcaraz committed Jul 18, 2023
1 parent 3e548f7 commit 5365fd8
Showing 1 changed file with 27 additions and 10 deletions.
37 changes: 27 additions & 10 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Publish Packages (NPM & Github)
on:
workflow_dispatch:
release:
types: [published]

Expand All @@ -22,7 +23,7 @@ jobs:
- name: "Prepare npmrc"
run: envsubst < .npmrc_ci > .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN}}

- name: "Install deps"
run: npm ci
Expand All @@ -36,12 +37,28 @@ jobs:
build-github:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://npm.pkg.github.com"
- run: npm ci
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Checkout"
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: "Setup node"
uses: actions/setup-node@v3
with:
node-version: "lts/*"
registry-url: 'https://npm.pkg.github.com'
scope: '@aleph-sdk'

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

- name: "Install deps"
run: npm ci

- name: "Build"
run: npm run build

- name: "Publish package"
run: npm run publish

0 comments on commit 5365fd8

Please sign in to comment.