Skip to content

Commit

Permalink
ci: fix release script
Browse files Browse the repository at this point in the history
  • Loading branch information
mo4islona committed Apr 2, 2024
1 parent 4e03a4b commit 51a8dd8
Showing 1 changed file with 16 additions and 14 deletions.
30 changes: 16 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,31 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Install node
uses: actions/setup-node@v4
with:
node-version: 18

- name: Install Yarn
run: corepack enable

# Yarn dependencies cannot be cached until yarn is installed
# WORKAROUND: https://github.com/actions/setup-node/issues/531
- name: Extract cached dependencies
uses: actions/setup-node@v4
with:
cache: yarn

- 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-cli
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
run: yarn install --immutable

- name: Build
run: yarn build
Expand Down

0 comments on commit 51a8dd8

Please sign in to comment.