Skip to content

fix: github actions step #2

fix: github actions step

fix: github actions step #2

Workflow file for this run

name: Release
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CI: true
PNPM_CACHE_FOLDER: .pnpm-store
defaults:
run:
shell: bash
jobs:
release:
name: Release by changeset
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Setup Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Setup pnpm 9.x
uses: pnpm/[email protected]
with:
version: 9.x
- name: Install dependencies
run: pnpm install
- name: Build packages
run: pnpm run build
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
publish: pnpm release
commit: 'release: update versions by GitHub Actions'
title: 'release: update versions by GitHub Actions'
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Send a Slack notification if a publish happens
if: steps.changesets.outputs.published == 'true'
run: my-slack-bot send-notification --message "A new version of ${GITHUB_REPOSITORY} was published!"