Skip to content

release: v1.1.2 (hotfix to v1.1.1) #212

release: v1.1.2 (hotfix to v1.1.1)

release: v1.1.2 (hotfix to v1.1.1) #212

name: release kloudlite
on:
workflow_dispatch:
push:
tags:
- 'v*'
# push:
# branches:
# - 'release-v*'
# tags:
# - '*'
# paths:
# - api
# - operator
# - infrastructure-as-code
# - kubelet-metrics-reexporter
# - autoscaler
# - "api/**"
# - "operator/**"
# - "infrastructure-as-code/**"
# - "kubelet-metrics-reexporter/**"
# - "autoscaler/**"
# - "kl/**"
# - "web/**"
# - ".github/workflows/**"
permissions:
contents: write
packages: write
jobs:
web:
uses: ./.github/workflows/web.yml
secrets: inherit
api:
uses: ./.github/workflows/api.yml
secrets: inherit
operator:
uses: ./.github/workflows/operator.yml
secrets: inherit
kl:
needs:
- operator
- api
uses: ./.github/workflows/kl.yml
secrets: inherit
infrastructure-as-code:
uses: ./.github/workflows/infrastructure-as-code.yml
secrets: inherit
with:
working_directory: ./infrastructure-as-code
image_name_prefix: ghcr.io/${{ github.repository }}/infrastructure-as-code
autoscaler:
uses: ./.github/workflows/autoscaler.yml
secrets: inherit
kubelet-metrics-reexporter:
uses: ./.github/workflows/kubelet-metrics-reexporter.yml
secrets: inherit
# k3s:
# runs-on: ubuntu-latest
# name: supported k3s binary
# env:
# K3S_VERSION: "v1.28.6+k3s2"
# steps:
# - name: k3s binary download
# run: |+
# curl -L0 "https://github.com/k3s-io/k3s/releases/download/$K3S_VERSION/k3s" > ./k3s
#
# - name: Upload Build Artifact
# uses: actions/upload-artifact@v4
# with:
# name: k3s
# path: ./k3s
github_release:
needs:
- api
- operator
- infrastructure-as-code
- autoscaler
- web
- kl
- kubelet-metrics-reexporter
runs-on: ubuntu-latest
name: Creating a Github Release
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
# - name: Download all artifacts
# uses: actions/download-artifact@v4
# with:
# name: k3s-runner
# path: k3s-runner-artifacts
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
name: kl
path: kl-artifacts
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
name: k3s
path: k3s
- run: |+
ls kl-artifacts/*
ls k3s/*
- name: Create Release Tag from branch name
id: gitref_branch
if: startsWith(github.ref, 'refs/heads/release')
shell: bash
run: |
set +e
RELEASE_TAG=${GITHUB_REF#refs/heads/release-}
echo "$RELEASE_TAG" | grep -i '\-nightly$'
if [ $? -ne 0 ]; then
RELEASE_TAG="$RELEASE_TAG-nightly"
fi
set -e
echo "release_tag=$RELEASE_TAG" >> $GITHUB_ENV
echo "override_release_assets=true" >> $GITHUB_ENV
echo "github_branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV
- name: Create Release Tag from git tag
if: startsWith(github.ref, 'refs/tags/')
id: gitref_tag
shell: bash
run: |
RELEASE_TAG=$(echo ${GITHUB_REF#refs/tags/})
echo "release_tag=$RELEASE_TAG" >> $GITHUB_ENV
echo "override_release_assets=false" >> $GITHUB_ENV
- name: Github Release
uses: ./.github/actions/github-release/
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_tag: ${{ env.release_tag }}
github_ref: ${GITHUB_REF}
files: |+
kl-artifacts/**
k3s/**
- name: Push Nightly Release To Discord
uses: ./.github/actions/discord/
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL_NIGHTLY }}
- name: Push Release To Discord
if: startsWith(github.ref, 'refs/tags/')
uses: ./.github/actions/discord/
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK_URL }}