Skip to content

Merge pull request #198 from api3dao/changeset-release/production #114

Merge pull request #198 from api3dao/changeset-release/production

Merge pull request #198 from api3dao/changeset-release/production #114

Workflow file for this run

# 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@v4
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
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
commit: "ci: release packages"
title: "ci: release packages"
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
- name: Apply changes
if: steps.changesets.outputs.published == 'true'
uses: peter-evans/create-pull-request@v5
with:
branch: main
base: production
env:
GITHUB_TOKEN: ${{ secrets.PAT }}