Skip to content

Workflow file for this run

name: Publish Packages (NPM & Github)
on:
push:
branches:
- feature/package-refactor
release:
types: [published]
jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- 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://registry.npmjs.org'
scope: '@aleph-sdk'
- name: "Prepare npmrc"
run: envsubst < .npmrc_ci > .npmrc
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN}}
- name: "Install deps"
run: npm ci
- name: "Build"
run: npm run build
- name: "Publish package"
run: npm run publish
publish-github:
runs-on: ubuntu-latest
steps:
- 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