Comments (11)
I've encountered this as well, i started creating v0.0.0 releases every time i create a new repo
from github-tag-action.
Yup, you understood perfectly :) Ok! Will work on that
from github-tag-action.
Hey @mathieudutour would you mind if I take this and make a PR for it during this week?
from github-tag-action.
So, this action already assumed the prior tag to be 0.0.0
when there is no tag in the repo.
I have a no-code fix for this that I've implemented on some private repos:
I'd like the initial release for the repo to be v1.0.0
so I've set this up to calculate the default_bump
in a prior step based on if there's a tag or not. The actions-ecosystem/action-get-latest-tag
action defaults to v0.0.0
when there is no tag, so based on this I'm setting the default_bump
to be major
. If you want it to be 0.1.0, just set it to minor
.
If you choose to set default_bump
to false, then clearly this won't work.
steps:
- uses: 'actions/[email protected]'
with:
fetch-depth: 0
- name: 'Action Get Latest Tag'
uses: 'actions-ecosystem/[email protected]'
id: 'get-latest-tag'
with:
semver_only: true
- name: 'Determine default bump'
id: 'bump'
run: |
LATEST_TAG=${{ steps.get-latest-tag.outputs.tag }}
if [ "$LATEST_TAG" = "v0.0.0" ]; then
echo "::set-output name=type::major"
else
echo "::set-output name=type::patch"
fi
- name: 'Bump version and push tag'
id: 'tag_version'
uses: 'mathieudutour/[email protected]'
with:
github_token: '${{ secrets.REPO_ONLY }}'
release_branches: 'main'
default_bump: '${{ steps.bump.outputs.type }}'
from github-tag-action.
I've gotten 0.0.1
on repos with no tags using v5 of this action
from github-tag-action.
I've encountered this as well, i started creating v0.0.0 releases every time i create a new repo
That's exactly what I ended up doing...
from github-tag-action.
yeah I'd be more than happy to review a PR :)
from github-tag-action.
I started working on this and I could isolate the case where this is happenning: default_bump set to 'false', it should probably create tag v0.0.0 or the correspoding semver tag for the commits.
from github-tag-action.
So, here's my question for you @mathieudutour, should the script automatically create the tag 0.0.0 or a tag based on the commits the user just pushed?
from github-tag-action.
Not sure I understand exactly but I'd say the script should assume the previous tag was 0.0.0
if there wasn't any before, and generate the real one based on the commits (and bump relatively to 0.0.0
).
from github-tag-action.
Is there an updated for this issue?
from github-tag-action.
Related Issues (20)
- Prerelease does not Respect Default_Bump
- Github action suddenly no longer working HOT 1
- [Bug] new_version/new_tag is never undefined HOT 2
- Release tags are created on pull requests despite having set a release_branch HOT 6
- The `set-output` command is deprecated and will be disabled soon. HOT 2
- [Question] how to use custom release rules for AB# HOT 2
- "perf: commit" does not get identified as a Major release but a Patch version HOT 1
- Question - Possible to omit branch name? HOT 2
- Deprecation warning: set-output to be disabled on May 31st, 2023 HOT 2
- on PR getting Error: Not Found HOT 4
- How to fix `Parameter token or opts.auth is required` HOT 3
- [HELP] [QUESTION] Pull request not generate changelog HOT 1
- Bug: default_bump not respected + unwanted text added to tag HOT 5
- Access latest "release" version?
- Suggestion - Use github.token HOT 1
- Possibility to customise issueUrlFormat
- how to force push an existed tag ?
- [feature] Rolling release versions
- Set Major. Minor, or Patch Release HOT 2
- Bug: Unable to retrieve commits history when using Squash and Merge on Pull requests
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from github-tag-action.