Skip to content

Publish candidate package #33

Publish candidate package

Publish candidate package #33

Workflow file for this run

name: Publish candidate package
on:
workflow_dispatch:
inputs:
npm_tag:
description: The tag with which the package is tagged on npm.
required: true
options:
- dev
- alpha
- beta
- rc
type: choice
default: dev
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- run: yarn install --immutable
- run: yarn build
- run: yarn test:ci
publish-npm:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install dependencies
run: yarn install --immutable
- name: Build packages
run: yarn run build
- name: Bundle library
run: yarn run bundle
- name: Get current package version
id: package_version
run: echo "package_version=$(node -pe "require('./package.json').version")" >> $GITHUB_OUTPUT
- name: Publish to NPM
run: yarn run publish --tag ${{ inputs.npm_tag }}
env:
YARN_NPM_AUTH_TOKEN: ${{secrets.npm_token}}
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: KILTProtocol/docs
event-type: sdk-update
client-payload: '{"latestTag": "${{ steps.package_version.outputs.package_version }}"}'