Skip to content

Commit 8c9a6c1

Browse files
committed
Don't create tags when versioning.
1 parent 1542eab commit 8c9a6c1

File tree

2 files changed

+11
-15
lines changed

2 files changed

+11
-15
lines changed

.github/workflows/version.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
version:
1212
name: Version
1313
runs-on: ubuntu-latest
14-
if: github.ref_name == 'main'
14+
if: github.ref == 'refs/heads/main'
1515
steps:
1616
- name: Checkout
1717
uses: actions/checkout@v4
@@ -35,7 +35,6 @@ jobs:
3535
git config user.name github-actions[bot]
3636
git config user.email github-actions[bot]@users.noreply.github.com
3737
pnpm run version ${{ inputs.version }}
38-
git push origin --tags --force
3938
4039
- name: Create PR with new versions
4140
uses: peter-evans/create-pull-request@v6

scripts/version.js

+10-13
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,15 @@ await Promise.all([
3434
),
3535
]);
3636
await new Promise((resolve, reject) => {
37-
// it's not ideal to create and push a tag at the time the PR is created, but once the PR is
38-
// merged main should contain the tag as if it were created there.
39-
exec(
40-
`git commit --all --message="v${newVersion}" && git tag "v${newVersion}"`,
41-
(error, stdout, stderr) => {
42-
if (error) {
43-
reject(error);
44-
} else {
45-
console.log(stdout);
46-
console.log(stderr);
47-
resolve(stdout);
48-
}
37+
// Don't create a tag. It's better to wait until this PR is merged, and a tag can be created from
38+
// the GitHub UI (the whole point of versioning + publishing from GitHub).
39+
exec(`git commit --all --message="v${newVersion}"`, (error, stdout, stderr) => {
40+
if (error) {
41+
reject(error);
42+
} else {
43+
console.log(stdout);
44+
console.log(stderr);
45+
resolve(stdout);
4946
}
50-
);
47+
});
5148
});

0 commit comments

Comments
 (0)