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

feat: use gh to release #66

Merged
merged 1 commit into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat: use gh to release
Signed-off-by: Jack Yu <[email protected]>
  • Loading branch information
Yu-Jack committed Dec 19, 2024
commit 2918ce36ef83efac024d7b4a3dfa90b69ad82296
10 changes: 4 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,12 @@ jobs:
run: |
echo "🍻" > release.txt
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
prerelease: true
body_path: release.txt
files: ${{ steps.info.outputs.artifacts_dir }}/*
GH_TOKEN: ${{ github.token }}
run: |
gh release create ${{ github.ref_name }} --draft --notes "Draft release for ${{ github.ref_name }}"
gh release upload ${{ github.ref_name }} ${{ steps.info.outputs.artifacts_dir }}/*
Copy link
Member

Choose a reason for hiding this comment

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

Should we make it a prerelease to align with the original code?

Copy link
Contributor Author

@Yu-Jack Yu-Jack Dec 18, 2024

Choose a reason for hiding this comment

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

I think we don't need to do it. It only uploads tarball when we create a release like this test https://github.com/Yu-Jack/docker-machine-driver-harvester/releases.

Copy link
Member

Choose a reason for hiding this comment

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

@FrankYang0529 do we need prerelease set to true?

Copy link
Member

Choose a reason for hiding this comment

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

Some of previous releases were created by github-actions. Probably, it's better to create a draft release first and manually change to latest release.

Screenshot 2024-12-18 at 4 03 11 PM

Copy link
Contributor Author

@Yu-Jack Yu-Jack Dec 18, 2024

Choose a reason for hiding this comment

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

It depends on tag or release. If we prefer to create a tag first, then we can use draft release. If we prefer to create a release directly, then we don't need to use this action to create a draft release. But, I just modified my codes to support creating a draft release.


publish-gcp:
name: Publish artifacts to GCP
Expand Down
Loading