-
Notifications
You must be signed in to change notification settings - Fork 0
chore: add release action #17
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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 hidden or 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,36 @@ | ||
| name: Update main release version | ||
| run-name: Move ${{ github.event.inputs.main_version }} to ${{ github.event.inputs.target }} | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| target: | ||
| description: The tag of the target version which should be used as the new main version | ||
| required: true | ||
| main_version: | ||
| type: choice | ||
| description: The main version to update | ||
| options: | ||
| - v1 | ||
|
|
||
| jobs: | ||
| move-version: | ||
| permissions: | ||
| id-token: write | ||
| contents: write | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 # Required since we need to ensure all tags are contained within the checkout. | ||
|
|
||
| - name: Setup GitSign | ||
| uses: chainguard-dev/actions/setup-gitsign@main | ||
|
|
||
| - name: Move main version tag | ||
| run: | | ||
| git config --global user.email "roxbot@stackrox.com" | ||
| git config --global user.name "Robot Rox" | ||
| # Move the main version tag to the target tag. | ||
| git tag -s -f ${{ github.event.inputs.main_version }} ${{ github.event.inputs.target }} | ||
| git push origin ${{ github.event.inputs.main_version }} --force --tags | ||
This file contains hidden or 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,23 @@ | ||
| # Releasing a new version | ||
|
|
||
| This documents all steps requires to release a new version of the central-login GitHub Action. | ||
|
|
||
| ## Create a new GitHub release incl. tag | ||
|
|
||
| Once you're ready to release, create a GitHub release including a new release. | ||
| Currently, no special GitHub action is used to draft the release, we use the default GitHub template for the release | ||
| notes. | ||
|
|
||
| We strive to version according to [semantic versioning](https://semver.org/). | ||
|
|
||
| ## Move the main version tag to the new version | ||
|
|
||
| Once the new release is created including the new tag, we move the main version tag (i.e `v1`) to point to the newly | ||
| released version. | ||
|
|
||
| This is done by manually triggering the workflow `update-main-version`. | ||
|
|
||
| As input, you have to choose the main version for which you want to move the referenced Git commit (i.e. `v1`) as well | ||
| as the newly created release tag. | ||
|
|
||
| Once the action run has been successful, the release of the new version is complete. |
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.
Uh oh!
There was an error while loading. Please reload this page.