mirror of
https://github.com/goauthentik/authentik.git
synced 2026-08-30 18:51:39 -07:00
97 lines
3.6 KiB
YAML
97 lines
3.6 KiB
YAML
---
|
|
name: Release - Branch-off
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
next_version:
|
|
description: Next version (for example, if you're currently releasing 2026.5, then enter 2026.8)
|
|
required: true
|
|
type: string
|
|
|
|
env:
|
|
POSTGRES_DB: authentik
|
|
POSTGRES_USER: authentik
|
|
POSTGRES_PASSWORD: "EK-5jnKfjrGRm<77"
|
|
|
|
jobs:
|
|
check-inputs:
|
|
name: Check inputs validity
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- run: |
|
|
echo "${{ inputs.next_version }}" | grep -E "^[0-9]{4}\.[0-9]{1,2}$"
|
|
branch-off:
|
|
name: Branch-off
|
|
needs:
|
|
- check-inputs
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- id: app-token
|
|
name: Generate app token
|
|
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v2
|
|
with:
|
|
client-id: ${{ secrets.GH_APP_ID }}
|
|
private-key: ${{ secrets.GH_APP_PRIV_KEY }}
|
|
- name: Checkout main
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v5
|
|
with:
|
|
ref: main
|
|
token: "${{ steps.app-token.outputs.token }}"
|
|
- name: Setup authentik env
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
dependencies: python
|
|
- name: Create version branch
|
|
env:
|
|
GH_TOKEN: "${{ steps.app-token.outputs.token }}"
|
|
run: |
|
|
current_version_family="$(uv version --short | grep -oE "^[0-9]{4}\.[0-9]{1,2}")"
|
|
git checkout -b "version-${current_version_family}"
|
|
git push origin "version-${current_version_family}"
|
|
gh label create "backport/version-${current_version_family}" --description "Add this label to PRs to backport changes to version-${current_version_family}" --color "fbca04"
|
|
bump-version-pr:
|
|
name: Open version bump PR
|
|
needs:
|
|
- branch-off
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- id: generate_token
|
|
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v2
|
|
with:
|
|
client-id: ${{ secrets.GH_APP_ID }}
|
|
private-key: ${{ secrets.GH_APP_PRIV_KEY }}
|
|
- name: Checkout main
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v5
|
|
with:
|
|
ref: main
|
|
token: ${{ steps.generate_token.outputs.token }}
|
|
- name: Setup authentik env
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
dependencies: "system,python,go,node,runtime,rust-nightly"
|
|
- name: Run migrations
|
|
run: make migrate
|
|
- name: Update previous version
|
|
run: |
|
|
VERSION_FAMILY_PREVIOUS="$(grep -oE "^[0-9]{4}\.[0-9]{1,2}" ${PWD}/internal/constants/VERSION)"
|
|
sed -i -E \
|
|
"s/^VERSION_FAMILY_PREVIOUS = .*/VERSION_FAMILY_PREVIOUS = \"${VERSION_FAMILY_PREVIOUS}\"/" \
|
|
"${PWD}/authentik/__init__.py"
|
|
- name: Bump version
|
|
run: "make bump version=${{ inputs.next_version }}.0-rc1"
|
|
- name: Re-generate API Clients
|
|
run: make gen
|
|
- name: Create pull request
|
|
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v7
|
|
with:
|
|
token: ${{ steps.generate_token.outputs.token }}
|
|
branch: release-bump-${{ inputs.next_version }}
|
|
commit-message: "root: bump version to ${{ inputs.next_version }}.0-rc1"
|
|
title: "root: bump version to ${{ inputs.next_version }}.0-rc1"
|
|
body: "root: bump version to ${{ inputs.next_version }}.0-rc1"
|
|
delete-branch: true
|
|
signoff: true
|
|
# ID from https://api.github.com/users/authentik-automation[bot]
|
|
author: authentik-automation[bot] <135050075+authentik-automation[bot]@users.noreply.github.com>
|