Skip to content

Release

Release #20

Workflow file for this run

name: Release
on:
workflow_dispatch:
branches:
- trunk
permissions: {}
jobs:
release:
permissions:
contents: write # to create release (changesets/action)
pull-requests: write # to create pull request (changesets/action)
runs-on: ubuntu-focal
steps:
- uses: actions/checkout@v2
with:
# This makes action fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- name: Cache node modules
id: cache-npm
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
key: reaction-v6-node-modules-${{ hashFiles('package.json') }}-${{ hashFiles('pnpm-lock.yaml') }}
path: "**/node_modules"
- name: Use Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 18.10
- name: Install pnpm
run: npm i -g pnpm@latest
- name: Install Dependencies
run: pnpm install --ignore-scripts
- name: Create Release Pull Request
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update pnpm-lock.yaml
run: pnpm install --no-frozen-lockfile --lockfile-only
- name: Commit new pnpm-lock.yaml
uses: EndBug/add-and-commit@v9
with:
add: "pnpm-lock.yaml"
message: "feat: update pnpm-lock"
new_branch: changeset-release/trunk
committer_name: github-actions[bot]
committer_email: 41898282+github-actions[bot]@users.noreply.github.com
pathspec_error_handling: ignore
commit: --signoff