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

chore: Add release please action #22

Merged
merged 9 commits into from
Jan 15, 2025
Merged

Conversation

shubham2g
Copy link

chore: Add release please action

Jira Ticket#https://jira.nutanix.com/browse/NCN-104689

@shubham2g shubham2g self-assigned this Jan 10, 2025
@shubham2g shubham2g requested a review from a team as a code owner January 10, 2025 13:43
@shubham2g shubham2g force-pushed the Shubham/release-please-auto branch from 3d0ae61 to e379a22 Compare January 10, 2025 14:46
@shubham2g shubham2g requested a review from mhrabovcin January 13, 2025 04:39
@mhrabovcin
Copy link

@shubham2g this requires also a github action workflow. https://github.com/googleapis/release-please-action Please see some example in other NKP repos.

@shubham2g
Copy link
Author

Hi @mhrabovcin Created Github Action Workflow, kindly review.

Comment on lines 22 to 23
with:
token: ${{ secrets.MESOSPHERECI_USER_TOKEN }}
Copy link

@mhrabovcin mhrabovcin Jan 13, 2025

Choose a reason for hiding this comment

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

Remove this secret usage.

@mhrabovcin
Copy link

@shubham2g the action and new files needs some adjustments:

Here is an example of release please action for a public repo - https://github.com/nutanix-cloud-native/cluster-api-runtime-extensions-nutanix/blob/main/.github/workflows/release-please.yml

Comment on lines 16 to 18
runs-on:
- self-hosted
- small

Choose a reason for hiding this comment

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

Use a public runner.

Comment on lines 28 to 30
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

Choose a reason for hiding this comment

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

What are these options doing?

Copy link
Author

Choose a reason for hiding this comment

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

If release-please includes GHCR as part of its release process (e.g., for publishing containerized artifacts or versions), this configuration is essential for authentication. However, if it does not involve pushing or pulling artifacts from GHCR (e.g., it only handles GitHub releases and tags), this block is unnecessary. Since I’m uncertain about the current need for GHCR, it might be safe to omit this block for now and add it later if GHCR interaction becomes required.

Choose a reason for hiding this comment

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

We've chatted via slack - these input values are not supported by the action.

- uses: googleapis/release-please-action@v4
id: release-please
with:
release-type: go

Choose a reason for hiding this comment

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

This shouldn't be included - we want to ru manifest release type.

Suggested change
release-type: go

Comment on lines 35 to 36
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Choose a reason for hiding this comment

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

Suggested change
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

I don't think that this is necessary.

Comment on lines 44 to 51
git tag -d v${{ steps.release.outputs.major }} || true
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git push origin :v${{ steps.release.outputs.major }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
git push origin v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}

Choose a reason for hiding this comment

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

Suggested change
git tag -d v${{ steps.release.outputs.major }} || true
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git push origin :v${{ steps.release.outputs.major }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
git push origin v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
git tag -a ${{ steps.release-please.outputs.tag_name }} -m "Release ${{ steps.release-please.outputs.tag_name }}"
git push origin ${{ steps.release-please.outputs.tag_name }}

Comment on lines 52 to 53
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Choose a reason for hiding this comment

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

Suggested change
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Copy link
Author

Choose a reason for hiding this comment

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

Removed.

@shubham2g shubham2g requested a review from mhrabovcin January 15, 2025 13:26
Comment on lines 14 to 15
tags:
- 'v*'

Choose a reason for hiding this comment

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

Suggested change
tags:
- 'v*'

This action should run on branches.

@mhrabovcin mhrabovcin merged commit afe915e into master Jan 15, 2025
2 checks passed
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.

2 participants