-
Notifications
You must be signed in to change notification settings - Fork 94
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: Enable Versioning #98
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Please accept Google CLA |
.github/workflows/release.yml
Outdated
- uses: actions/checkout@v3 | ||
|
||
- name: Create Release | ||
uses: ncipollo/release-action@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.
Like in PR #35, we don't want extra third-party dependencies here, especially for the release process. We would prefer to explore native Github mechanism (if any) for that.
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.
Understood. Thanks a lot for the advice. I will be working on that.
.github/workflows/release.yml
Outdated
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload asset | ||
uses: svenstaro/upload-release-action@v2 |
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.
same here.
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.
Understood.
Signed-off-by: zhanghan <290459366@qq.com>
Hi, I have removed the third-party dependencies and committed a new file. I have made tests and it works fine in my forked repository. I also added the usage and notes in the file. Please take a look:). |
# Note that the release automatically contains source code, the upload assets can be a description file of this version, e.g. change.txt | ||
- name: Create Release | ||
run: | | ||
gh release create ${{ github.ref }} ./*.txt |
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.
Thanks, but we would prefer to move forward with solution in #100
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.
Thanks, but we would prefer to move forward with solution in #100
Thanks for your reply. I viewed the solution in #100. The release is achieved via a GitHub action release-please-action (https://github.com/marketplace/actions/release-please-action). It seems still a third-party dependency created by some contributors and published on the GitHub action marketplace, similar to those actions I used in my prior PR version. That's why I use the gh command.
Please let me know if the release-please-action is ok. Then I'm glad to update my YAML file and solve this versioning issue.
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.
Let me think for a bit on this solution vs #100.
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.
Let me think for a bit on this solution vs #100.
Sure!
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.
I will try #100 and if we don't like it we will move with this solution.
We will release manually via Github Actions. It has enough features in order to do that. |
Description
Enable versioning for GCP Scanner with GitHub release and tag.
Changes Made
Add a YAML file to modify GitHub Action workflow.
Usage
Step 1: commit
Step 2: assign a tag.
git tag v1.0.0 -m 'test for versioning'
Step 3: push.
git push origin v1.0.0
Result: a release and a tag are automatically generated.
Related Issues
#20
related pr: #35
Additional Notes
This function requires configuring the workflow permissions with 'Read and Write permissions'.