-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Felix Wenzel
authored and
Felix Wenzel
committed
Jan 9, 2024
1 parent
4a67a0d
commit 07fed94
Showing
3 changed files
with
67 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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,34 @@ | ||
name: Init Release | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
TARGET_VERSION: | ||
description: 'TARGET_VERSION to build manifests (e.g. 2.5.0-rc1) Note: the `v` prefix is not used' | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
init-release: | ||
name: Create new release for ${{ inputs.TARGET_VERSION }} | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
ref: main | ||
|
||
- name: Check if TARGET_VERSION is well formed. | ||
run: | | ||
set -xue | ||
# Target version must not contain 'v' prefix | ||
if echo "${{ inputs.TARGET_VERSION }}" | grep -e '^v'; then | ||
echo "::error::Target version '${{ inputs.TARGET_VERSION }}' should not begin with a 'v' prefix, refusing to continue." >&2 | ||
exit 1 | ||
fi | ||
- name: Create release | ||
run: | | ||
gh release create v${{ inputs.TARGET_VERSION }} --generate-notes | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains 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,31 @@ | ||
name: Release Charts | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Replace version | ||
run: | | ||
cd charts/azure-clientid-syncer-webhook | ||
sed -i "s/version:.*/version: ${{ github.ref }}/g" Chart.yaml | ||
cat Chart.yaml | ||
# - name: Configure Git | ||
# run: | | ||
# git config user.name "$GITHUB_ACTOR" | ||
# git config user.email "[email protected]" | ||
# | ||
# - name: Run chart-releaser | ||
# uses: helm/[email protected] | ||
# env: | ||
# CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
This file contains 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