Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0121edc

Browse files
committed
ci: publish major and minor tags
Make sure major and minor tags are up to date on a patch release. This would allow the common practice to use major tag on the action: ```yaml - name: Create bump and changelog uses: commitizen-tools/commitizen-action@0 ``` (Ideally you may want to prefix version with `v` 🤷) This what this third party action does under the hood: ```bash $ TAG="0.21.0" $ MINOR="${TAG%.*}" $ echo $MINOR 0.21 $ MAJOR="${MINOR%.*}" $ echo $MAJOR 0 ``` This is used here for example: https://github.com/astral-sh/setup-uv/blob/main/.github/workflows/update-major-minor-tags.yml
1 parent a49cac8 commit 0121edc

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

‎.github/workflows/bumpversion.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ jobs:
1717
- name: Create bump and changelog
1818
uses: commitizen-tools/commitizen-action@master
1919
with:
20-
github_token: "${{ secrets.GITHUB_TOKEN }}"
20+
github_token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
2121
changelog_increment_filename: body.md
2222
- name: Release
2323
uses: softprops/action-gh-release@v1
2424
with:
2525
body_path: "body.md"
2626
tag_name: "${{ env.REVISION }}"
2727
env:
28-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
28+
GITHUB_TOKEN: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"

‎.github/workflows/update_semver.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Update Major Minor Tags
2+
3+
on:
4+
push:
5+
branches-ignore:
6+
- "**"
7+
tags:
8+
- "*.*.*"
9+
workflow_dispatch:
10+
11+
jobs:
12+
update_major_minor_tags:
13+
name: Make sure major and minor tags are up to date on a patch release
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
- name: Run Update semver
19+
uses: haya14busa/action-update-semver@v1

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /