Skip to content

Commit 74a7e1b

Browse files
authored
Merge pull request #9 from flick-ing/test-changeset-1
Test changeset 1
2 parents e000469 + 1d3aba3 commit 74a7e1b

File tree

2 files changed

+31
-31
lines changed

2 files changed

+31
-31
lines changed

.github/workflows/changeset.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Create Version PR
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
version:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: '22.x'
16+
- run: yarn install --frozen-lockfile
17+
- name: Create version PR
18+
uses: changesets/action@v1
19+
with:
20+
commit: 'chore: version packages'
21+
title: 'chore: version packages'
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.WORKSPACE_TOKEN }}

.github/workflows/release.yml

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,54 +4,31 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request:
8-
types: [closed]
97

108
permissions:
11-
id-token: write
129
contents: write
13-
actions: write
10+
id-token: write
1411

1512
jobs:
16-
createReleasePR:
17-
runs-on: ubuntu-latest
18-
steps:
19-
- uses: actions/checkout@v4
20-
with:
21-
fetch-depth: 0
22-
- uses: actions/setup-node@v4
23-
with:
24-
node-version: '22.x'
25-
registry-url: 'https://registry.npmjs.org'
26-
- run: yarn install --frozen-lockfile
27-
- name: Create Release Pull Request or Publish
28-
uses: changesets/action@v1
29-
with:
30-
publish: yarn workspaces run build
31-
commit: 'chore: version packages'
32-
title: 'chore: version packages'
33-
env:
34-
GITHUB_TOKEN: ${{ secrets.WORKSPACE_TOKEN }}
13+
version:
14+
if: "contains(github.event.head_commit.message, 'chore: version packages')"
3515

36-
publish:
37-
needs: createReleasePR
3816
runs-on: ubuntu-latest
39-
if: github.event_name == 'pull_request' && github.event.pull_request.merged == true && contains(github.event.pull_request.title, 'chore: version packages')
4017
steps:
4118
- uses: actions/checkout@v4
4219
with:
4320
fetch-depth: 0
21+
4422
- uses: actions/setup-node@v4
4523
with:
4624
node-version: '22.x'
4725
registry-url: 'https://registry.npmjs.org'
26+
4827
- run: yarn install --frozen-lockfile
49-
- name: Publish packages
28+
29+
- name: Publish packages to npm
5030
uses: changesets/action@v1
5131
with:
52-
publish: |
53-
cd packages/tsconfig && npm publish --access public --provenance
54-
cd ../inscriptions && npm publish --access public --provenance
32+
publish: yarn changeset publish
5533
env:
5634
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
57-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)