Skip to content

v0.14.1

v0.14.1 #64

Workflow file for this run

name: Release
on:
release:
types:
- created
jobs:
publish:
name: Build & Publish to NPM
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: denoland/setup-deno@61fe2df320078202e33d7d5ad347e7dcfa0e8f31 # v1.1.2
with:
deno-version: v1.x
- name: Retrieve Version
if: startsWith(github.ref, 'refs/tags/')
id: get_tag_version
run: echo "TAG_VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- uses: actions/setup-node@v3
with:
node-version: "16.x"
registry-url: "https://registry.npmjs.org"
- name: Build NPM Package
run: deno run -A --no-check=remote ./_tasks/build_npm_pkg.ts ${{steps.get_tag_version.outputs.TAG_VERSION}}
- run: npm pack
working-directory: "./target/npm_pkg/"
- uses: actions/upload-artifact@v3
with:
name: package
path: "./target/npm_pkg/*.tgz"
- uses: octokit/request-action@v2.x
if: startsWith(github.ref, 'refs/tags/')
with:
route: POST /repos/paritytech/npm_publish_automation/actions/workflows/publish.yml/dispatches
ref: main
inputs: '${{ format(''{{ "repo": "{0}", "run_id": "{1}" }}'', github.repository, github.run_id) }}'
env:
GITHUB_TOKEN: ${{ secrets.NPM_PUBLISH_AUTOMATION_TOKEN }}