Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: publish major and minor tags #88

Merged
merged 1 commit into from
Feb 5, 2025

Conversation

nikaro
Copy link
Contributor

@nikaro nikaro commented Sep 22, 2024

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:

- 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:

$ 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

@nikaro
Copy link
Contributor Author

nikaro commented Sep 22, 2024

Since you are using the default token with ${{ secrets.GITHUB_TOKEN }} it may not be triggered automatically, though :-/

I added the workflow_dispatch trigger to allow to run it manually on tags.

@woile
Copy link
Member

woile commented Feb 4, 2025

Please, update the bump version to use secrets.PERSONAL_ACCESS_TOKEN, I've added the secret

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
@nikaro nikaro force-pushed the ci/publish-major-minor-tag branch from 0ce327f to 0121edc Compare February 5, 2025 09:02
@nikaro
Copy link
Contributor Author

nikaro commented Feb 5, 2025

Please, update the bump version to use secrets.PERSONAL_ACCESS_TOKEN, I've added the secret

Hi, i've done it.

@woile woile merged commit 5bf62b0 into commitizen-tools:master Feb 5, 2025
1 check passed
@nikaro nikaro deleted the ci/publish-major-minor-tag branch February 5, 2025 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants