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

deploy - use tag as version #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

deploy - use tag as version #68

wants to merge 1 commit into from

Conversation

drahnr
Copy link
Contributor

@drahnr drahnr commented Feb 2, 2022

Closes #67

@athei
Copy link
Member

athei commented Feb 4, 2022

But this doesn't update the Cargo.toml that is comitted. Only temporary. Shouldn't we just bump it manually and then release?

@drahnr
Copy link
Contributor Author

drahnr commented Feb 4, 2022

Well, we could inverse the relation. Make the manifest the truth and create a git tag after release (like cargo release does) - downside: The gh actions requires push access to master (not sure if there is a delta between tags and commits).

@athei
Copy link
Member

athei commented Feb 4, 2022

This sounds much better to me.

(not sure if there is a delta between tags and commits).

Don't understand what you mean. It would make the tag to a fixed commit hash and also release this very ref. If someone pushes to master in-between this wouldn't matter. Was this your concern?

@drahnr
Copy link
Contributor Author

drahnr commented Feb 4, 2022

Don't understand what you mean. It would make the tag to a fixed commit hash and also release this very ref. If someone pushes to master in-between this wouldn't matter. Was this your concern?

Access rights for the github action to tag (aka write to the repo would be required) - that's usually not great since the action can be modified by contributors, hence not great.

@athei
Copy link
Member

athei commented Feb 4, 2022

Aren't changes to github actions only executed once they are merged to master for this reason as a security measure (or at least you can enable that)?

uses: actions-rs/cargo@v1
with:
command: run
args: --release -- version set $(git tag --contains HEAD --format='%(refname)' | sd '^refs/tags/v([0-9]+\.[0-9]+\.[0-9]+(?:-[A-Za-z0-9]+(?:\.[0-9]+)?)?)$' '$1' )
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unleash already has git2 in its dependency tree and uses that. arguably, version set --git-tag might be something we want to support native..

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.

tag v1.0.0-alpha.14 released v1.0.0-alpha.dev
3 participants