Skip to content

Commit 2dcc3ed

Browse files
committed
feature: add versioning job
1 parent a2b0f8c commit 2dcc3ed

File tree

2 files changed

+38
-2
lines changed

2 files changed

+38
-2
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,10 @@ jobs:
3535
env:
3636
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3737

38-
- name: Create Release Pull Request or Publish to npm
38+
- name: Create Version Packages Pull Request or Publish to npm
3939
id: changesets
4040
uses: changesets/action@v1
4141
with:
42-
# This expects you to have a script called release which does a build for your packages and calls changeset publish
4342
publish: yarn exec .changeset/publish.sh --create-git-tags
4443
version: yarn exec .changeset/version.sh
4544
env:

.github/workflows/versioning.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Versioning
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency: ${{ github.workflow }}-${{ github.ref }}
9+
10+
jobs:
11+
release:
12+
name: Changesets Release
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
environment: production
18+
steps:
19+
- name: Checkout Repo
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node.js 18.x
23+
uses: actions/setup-node@v4
24+
with:
25+
cache: 'yarn'
26+
node-version: 18.x
27+
28+
- name: Install Dependencies
29+
run: yarn install --immutable
30+
31+
- name: Create Version Packages Pull Request
32+
id: changesets
33+
uses: changesets/action@v1
34+
with:
35+
version: yarn exec .changeset/version.sh
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)