Skip to content

Commit 439cb37

Browse files
committed
chore: update workflows
1 parent 8f3bf3b commit 439cb37

2 files changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main, alpha, beta, rc]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
9+
cancel-in-progress: true
10+
11+
env:
12+
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
13+
14+
permissions:
15+
contents: write
16+
id-token: write
17+
pull-requests: write
18+
19+
jobs:
20+
release:
21+
name: Release
22+
if: github.repository_owner == 'TanStack'
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4.2.2
27+
with:
28+
fetch-depth: 0
29+
- name: Setup Tools
30+
uses: tanstack/config/.github/setup@main
31+
- name: Run Tests
32+
run: pnpm run test:ci
33+
- name: Run Changesets (version or publish)
34+
uses: changesets/action@v1.4.9
35+
with:
36+
version: pnpm run changeset:version
37+
publish: pnpm run changeset:publish
38+
commit: 'ci: Version Packages'
39+
title: 'ci: Version Packages'
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
"packageManager": "pnpm@10.16.1",
99
"type": "module",
1010
"scripts": {
11+
"changeset": "changeset",
12+
"changeset:publish": "changeset publish",
13+
"changeset:version": "changeset version && pnpm install --no-frozen-lockfile && pnpm prettier:write",
1114
"clean": "pnpm --filter \"./packages/**\" run clean",
1215
"preinstall": "node -e \"if(process.env.CI == 'true') {console.log('Skipping preinstall...')} else {process.exit(1)}\" || npx -y only-allow pnpm",
1316
"test": "pnpm run test:ci",

0 commit comments

Comments
 (0)