ci: release ci steps fixed #2
Workflow file for this run
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
name: Release | |
on: | |
push: | |
branches: [main, feat/release-packages] | |
env: | |
CI: true | |
PNPM_CACHE_FOLDER: .pnpm-store | |
jobs: | |
release: | |
# Basic security: the release job can only be executed from this repo and from the main branch (not a remote thing) | |
# if: ${{ github.repository == 'teableio/teable' && contains('refs/heads/main',github.ref)}} | |
name: Create a PR for release workflow | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20.9.0] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: 📥 Monorepo install | |
uses: ./.github/actions/pnpm-install | |
- name: Setup npmrc | |
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc | |
- name: setup pnpm config | |
run: pnpm config set store-dir $PNPM_CACHE_FOLDER | |
- name: 🦋 Create Release Pull Request or Publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
commit: 'chore(release): version packages' | |
title: 'chore(release): version packages' | |
version: pnpm ci:version | |
publish: pnpm ci:publish | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |