-
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (46 loc) · 1.87 KB
/
Copy pathrelease.yml
File metadata and controls
50 lines (46 loc) · 1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Release
on:
push:
branches: [main, alpha, beta, rc]
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
cancel-in-progress: false
permissions:
contents: read
jobs:
release:
name: Release
# New libraries explicitly enable publishing after configuring their release setup.
if: github.repository_owner == 'TanStack' && vars.ENABLE_RELEASES == 'true'
permissions:
contents: write # Commit version changes, create tags and GitHub releases.
id-token: write # Authenticate npm trusted publishing with OIDC.
pull-requests: write # Create/update version PRs and release comments.
issues: write # Comment on linked issues after publishing.
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Tools
uses: TanStack/config/.github/setup@7bbdf583c2fc1a7f596283cd01e0e44c43f574f2 # main
- name: Run Tests
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
run: pnpm run test:ci
- name: Run Changesets (version or publish)
id: changesets
uses: changesets/action@ae32849d5ba541f9ae29e40e22a623bc13562f51 # v2.1.2
with:
version-script: pnpm run changeset:version
publish-script: pnpm run changeset:publish
commit-message: 'ci: Version Packages'
pr-title: 'ci: Version Packages'
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Comment on PRs about release
if: steps.changesets.outputs.published == 'true'
uses: TanStack/config/.github/comment-on-release@7bbdf583c2fc1a7f596283cd01e0e44c43f574f2 # main
with:
published-packages: ${{ steps.changesets.outputs.published-packages }}