-
Notifications
You must be signed in to change notification settings - Fork 1.5k
94 lines (86 loc) · 2.84 KB
/
v-next-changesets-release.yml
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# name: Changesets
# on:
# push:
# branches:
# - v-next
# jobs:
# changesetcheck:
# name: Changeset Check
# runs-on: ubuntu-latest
# outputs:
# CHANGESETS: ${{ steps.changesetcheck.outputs.CHANGESETS }}
# steps:
# - name: checkout code repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - uses: ./.github/actions/setup-env
# with:
# node-version: 22
# - name: Install
# run: pnpm install --no-frozen-lockfile
# - name: Changeset Check
# id: changesetcheck
# run: |
# pnpm changeset status --output=changes.json
# if grep "\"releases\": \[\]," changes.json; then
# echo "No changesets found."
# echo "changesets=notfound" >> "$GITHUB_OUTPUT"
# else
# echo "Changesets found."
# echo "changesets=found" >> "$GITHUB_OUTPUT"
# fi
# release-pre-check:
# name: Release Pre-Check
# runs-on: ubuntu-latest
# needs: [changesetcheck]
# if: needs.changesetcheck.outputs.CHANGESETS == 'found'
# steps:
# - name: checkout code repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - uses: ./.github/actions/setup-env
# with:
# node-version: 22
# - name: Install
# run: pnpm install --no-frozen-lockfile
# - name: Run full check (build, lint and test)
# run: pnpm run vnext-full-check
# release:
# name: Release
# runs-on: ubuntu-latest
# needs: [release-pre-check]
# permissions:
# contents: write
# id-token: write
# steps:
# - name: checkout code repository
# uses: actions/checkout@v4
# with:
# fetch-depth: 0
# - uses: ./.github/actions/setup-env
# with:
# node-version: 22
# - name: Install
# run: pnpm install --no-frozen-lockfile
# - name: Apply and commit changesets
# run: |
# echo "Changesets found. Starting release."
# # Apply prerelease changesets
# pnpm changeset version
# # Update the pnpm package lock file
# pnpm install --no-frozen-lockfile
# # Commit the changes and push
# git config --global user.name "Github Actions"
# git config --global user.email "[email protected]"
# git commit -a -m "chore: v-next version bump"
# git push
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Setup npmrc
# run: echo "//registry.npmjs.org/:_authToken=${{ secrets.VNEXT_NPM_TOKEN }}" > .npmrc
# - name: Publish
# run: pnpm publish --filter "./v-next/**" -r --no-git-checks --tag next --access public
# env:
# NPM_CONFIG_PROVENANCE: true