Skip to content

Release

Release #36

Workflow file for this run

name: Release
on:
workflow_dispatch:
inputs:
tag:
type: choice
description: Tag
required: true
options:
- beta
- latest
jobs:
build-publish:
name: Build & publish
runs-on: ubuntu-latest
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3
- name: Write npm credentials
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" >> .npmrc
npm whoami
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
id: yarn-cache
env:
cache-name: subsquid-manifest
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-${{ env.cache-name }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-${{ env.cache-name }}-yarn-
- name: Install
run: yarn install
- name: Test
run: yarn test
- name: Build
run: yarn build
- name: Release
run: npm publish --tag ${{ github.event.inputs.tag }} --access public
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}