-
Notifications
You must be signed in to change notification settings - Fork 321
feat: automatically update latest tag for cli releases #3194
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Elliot Hesp <[email protected]>
Co-authored-by: Elliot Hesp <[email protected]>
Co-authored-by: Elliot Hesp <[email protected]>
Co-authored-by: Elliot Hesp <[email protected]>
5908b57
to
98d5253
Compare
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.
Pull Request Overview
This PR enhances the CLI build workflow to automate release management with a "latest" tag system. The changes enable manual release creation through GitHub Actions with automatic latest tag updates for simplified CLI installation.
- Adds manual workflow inputs for version specification and optional release upload
- Implements automated GitHub release creation with changelog generation
- Creates a "latest" tag management system for consistent download URLs
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ inputs.version }} | ||
release_name: Genkit CLI ${{ inputs.version }} |
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 actions/create-release@v1
action is deprecated. Consider using softprops/action-gh-release@v1
or the GitHub CLI (gh release create
) for better maintenance and security.
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ inputs.version }} | |
release_name: Genkit CLI ${{ inputs.version }} | |
uses: softprops/action-gh-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ inputs.version }} | |
name: Genkit CLI ${{ inputs.version }} |
Copilot uses AI. Check for mistakes.
|
||
- name: Upload to GitHub Release | ||
uses: actions/upload-release-asset@v1 |
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 actions/upload-release-asset@v1
action is deprecated. Consider using softprops/action-gh-release@v1
which can handle both release creation and asset uploads in a single step.
Copilot uses AI. Check for mistakes.
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create-release.outputs.upload_url }} |
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 create-release
job doesn't expose upload_url
as an output. You need to add outputs: upload_url: ${{ steps.create_release.outputs.upload_url }}
to the create-release
job.
Copilot uses AI. Check for mistakes.
upload_url: ${{ needs.create-release.outputs.upload_url }} | ||
asset_path: ./genkit-${{ matrix.target }}${{ steps.binary.outputs.ext }} | ||
asset_name: genkit-${{ matrix.target }} |
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 asset name should include the file extension for Windows binaries. Use genkit-${{ matrix.target }}${{ steps.binary.outputs.ext }}
to ensure consistent naming with the actual file.
asset_name: genkit-${{ matrix.target }} | |
asset_name: genkit-${{ matrix.target }}${{ steps.binary.outputs.ext }} |
Copilot uses AI. Check for mistakes.
|
||
```bash | ||
TODO: Add installation instructions |
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 installation instructions placeholder should be replaced with actual installation commands before merging to production.
TODO: Add installation instructions | |
# For Linux (x64 or ARM64) | |
curl -LO https://github.com/firebase/genkit/releases/download/${{ inputs.version }}/genkit-linux-x64 | |
chmod +x genkit-linux-x64 | |
sudo mv genkit-linux-x64 /usr/local/bin/genkit | |
# For macOS (x64 or ARM64) | |
curl -LO https://github.com/firebase/genkit/releases/download/${{ inputs.version }}/genkit-darwin-x64 | |
chmod +x genkit-darwin-x64 | |
sudo mv genkit-darwin-x64 /usr/local/bin/genkit | |
# For Windows (x64) | |
curl -LO https://github.com/firebase/genkit/releases/download/${{ inputs.version }}/genkit-win32-x64.exe | |
move genkit-win32-x64.exe C:\Windows\System32\genkit.exe |
Copilot uses AI. Check for mistakes.
Summary
Updates CLI installation to use GitHub releases with automatic "latest" tag management and manual workflow triggers.
Changes
Install Script (
bin/install_cli
)https://github.com/firebase/genkit/releases/download/latest/genkit-$MACHINE
Build Workflow (
.github/workflows/build-cli-binaries.yml
)version
(required) andupload_to_release
(optional)create-release
: Creates GitHub release with download linksupload-assets
: Uploads binaries as release assetsupdate-latest-tag
: Updates "latest" tag to point to new releaseBenefits
Usage
upload_to_release
uncheckedupload_to_release
checked and specify version