Skip to content

Commit

Permalink
add init release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix Wenzel authored and Felix Wenzel committed Jan 9, 2024
1 parent 4a67a0d commit 07fed94
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 2 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/create-release.yaml
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 }}
31 changes: 31 additions & 0 deletions .github/workflows/push-helm.yaml
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 }}"
4 changes: 2 additions & 2 deletions charts/azure-clientid-syncer-webhook/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: azure-clientid-syncer-webhook
description: A Helm chart to install the azure-clientid-syncer webhook
type: application
version: 0.0.1
appVersion: 0.0.1
version: 0.0.0
appVersion: 0.0.0
home: https://github.com/shiftavenue/azure-clientid-syncer
sources:
- https://github.com/shiftavenue/azure-clientid-syncer

0 comments on commit 07fed94

Please sign in to comment.