Skip to content

Commit

Permalink
drop "incremental" version part, keep only minor and major
Browse files Browse the repository at this point in the history
  • Loading branch information
ewjoachim committed Aug 28, 2023
1 parent 084057b commit eb8069f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 17 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,23 +49,16 @@ jobs:
- name: Apply new tags
run: |
git fetch --tags origin
current="$(git describe --tags --abbrev=0 --match 'v*.*.*')"
should_bump_minor=$(pipx run conventional list-commits --from-last-tag --parse | jq --slurp 'any(.[]; .data.subject.breaking == "!")')
current="$(git describe --tags --abbrev=0 --match 'v*.*')"
major="$(echo $current | cut -d. -f1)"
minor="$(echo $current | cut -d. -f2)"
patch="$(echo $current | cut -d. -f3)"
git tag -f ${major}
git push -f origin ${major}
# Major releases will be released manually.
if [ "${should_bump_minor}" = "true" ]; then
minor=$((minor + 1))
new_tag="${major}.${minor}.0"
else
patch=$((patch + 1))
new_tag="${major}.${minor}.${patch}"
fi
patch=$((patch + 1))
new_tag="${major}.${minor}"
gh release create ${new_tag} --generate-notes
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,13 +387,13 @@ coverage (percentage) of the whole project from the PR build:

## Pinning

On the examples above, the version was set to the tag `v3`. Pinning to
a specific version (`v3.1.0` for example) would make the action more
reproducible, though you'd have to update it regularly (e.g. using Dependabot).
You can also pin a commit hash if you want to be 100% sure of what you run,
given that tags are mutable.
You can also decide to pin to main, if you're ok with the action maybe breaking
when (if) we release a v4.
On the examples above, the version was set to the tag `v3`. Pinning to a major version
will give you the latest release on this version. (Note that we release everytime after
a PR is merged). Pinning to a specific version (`v3.1` for example) would make the
action more reproducible, though you'd have to update it regularly (e.g. using
Dependabot). You can also pin a commit hash if you want to be 100% sure of what you run,
given that tags are mutable. Finally, You can also decide to pin to main, if you're ok
with the action maybe breaking when (if) we release a v4.

## Note on the state of this action

Expand Down

0 comments on commit eb8069f

Please sign in to comment.