Skip to content

Commit c58dd2e

Browse files
author
Disturbing
committed
fix: update workflow to directly publish without PR creation
1 parent 02b5ede commit c58dd2e

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

.github/workflows/release.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ jobs:
1313
permissions:
1414
contents: write
1515
packages: write
16-
pull-requests: write
1716
id-token: write
1817
steps:
1918
- name: Checkout
@@ -42,14 +41,30 @@ jobs:
4241

4342
- name: Test packages
4443
run: yarn test
44+
45+
- name: Setup Git User
46+
run: |
47+
git config --global user.name "github-actions[bot]"
48+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
4549
46-
- name: Create Release Pull Request or Publish to npm
47-
id: changesets
48-
uses: changesets/action@v1
49-
with:
50-
publish: yarn changeset publish
51-
commit: "chore(release): version packages"
52-
title: "chore(release): version packages"
50+
- name: Version and Publish
51+
run: |
52+
# Apply changesets (update version numbers)
53+
yarn changeset version
54+
55+
# Commit the version updates
56+
git add .
57+
git commit -m "chore(release): version packages" || echo "No changes to commit"
58+
59+
# Build once more to ensure latest versions are included
60+
yarn build
61+
62+
# Publish to npm
63+
yarn changeset publish
64+
65+
# Push the version updates and tags
66+
git push origin main
67+
git push --tags
5368
env:
5469
GITHUB_TOKEN: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }}
5570
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 commit comments

Comments
 (0)