Merge pull request #152 from api3dao/changeset-release/production #92
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/changesets/action | |
name: Release | |
on: | |
push: | |
branches: | |
- production | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
jobs: | |
release: | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "18.x" | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
${{ runner.os }}-yarn- | |
- name: Install dependencies | |
run: yarn --frozen-lockfile --network-timeout 300000 | |
- name: Build package | |
run: yarn build-svg | |
- name: Create Release Pull Request or Publish to npm | |
uses: changesets/action@master | |
with: | |
publish: yarn release | |
commit: "ci: release packages" | |
title: "ci: release packages" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |