-
Notifications
You must be signed in to change notification settings - Fork 1
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
Improve CLI help, add versioning, & list
/retrieve
enhancements
#30
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
764e83e
feat: version flag & GH tag/version action
dtbuchholz 945ea7d
feat: add cmd aliases, descriptive error strings, & docs improvements
dtbuchholz a7b0ce6
chore: add install to makefile
dtbuchholz a1cf149
feat: add version command, list cmd json format, more docs
dtbuchholz f02b0ab
docs: update readme
dtbuchholz c270b94
fix: alter gh version action logic, version logging
dtbuchholz dea664e
chore: update version to v0.0.6
dtbuchholz b7a45aa
feat: add vault alias flag '-v'
dtbuchholz d71ceac
feat: retrieve to custom output dir or stdout
dtbuchholz 571935a
chore: linting fixes; capitalization, new lines, colon usage in doc s…
dtbuchholz 91d733a
docs: fix incorrect vaults install link
dtbuchholz a670d23
chore: alter GH version workflow
dtbuchholz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Update version file | ||
|
||
on: | ||
release: | ||
types: | ||
- created | ||
|
||
jobs: | ||
update_version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Update version.json | ||
run: | | ||
echo "{ | ||
\"version\": \"${{ github.event.release.tag_name }}\" | ||
}" > version.json | ||
|
||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: "chore: update version to ${{ github.event.release.tag_name }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice! ideally, the
binaries
workflow would depend on a successful run of this one. not sure how easy it is to implement that, i think it's fine the way it isThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brunocalza maybe this would work? https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run
i have the
update-version
workflow to only work onmain
, though, so would that pose an issue if the generated binaries workflow was dependent on it?but yeah, maybe we can figure that out in a separate PR, if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hum, I missed this was triggered when a push happens to
main
. Ideally, it would be triggered when a release is created, right? and thebinaries
would be run after that. because if you createversion.json
when a push happens, the next binary release will have the wrong versionThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brunocalza ah, i see. when the binaries are generated, it looks like that's where the tag gets created, which is what i fetch to get the version in the CLI.
hm, so maybe my approach won't work because i'd need my GH action to run after that tag is created but before the binaries are generated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tag is not being created by the workflow. The tag is created by Github itself when a release is created.
I think you need to switch to
and somehow get access to the tag being created inside the workflow.
You can test that, by drafting new releases targeting your branch.
If this is taking too much of your time. Feel free to merge it and I can figure that out for you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brunocalza yeah, if you could take a look, that might be best! i dont want to mess up anything there. should i just merge this into your branch now?
i did alter my version workflow to take your trigger into account—this seems like it should work, but i havent tested it:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 feel free to merge it