Skip to content

Commit

Permalink
chore: add release action (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaus67 authored Nov 22, 2023
1 parent ec2dd68 commit 197b405
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/update-main-version.yml
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 "[email protected]"
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
23 changes: 23 additions & 0 deletions RELEASE.md
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.

0 comments on commit 197b405

Please sign in to comment.