Skip to content

Instantly share code, notes, and snippets.

@EdsonAlcala
Created December 16, 2022 12:01
Show Gist options
  • Save EdsonAlcala/befef4878d4d6e756509d8ff7cb8b970 to your computer and use it in GitHub Desktop.
Save EdsonAlcala/befef4878d4d6e756509d8ff7cb8b970 to your computer and use it in GitHub Desktop.
name: Protocol Release
on:
release:
types: [released, prereleased]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 16.13.x
- id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: yarn install --frozen-lockfile
- name: Compile
run: yarn compile:protocol
- name: Test contracts
run: yarn test:protocol
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- run: yarn publish:protocol
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment