Skip to content

Commit

Permalink
ci(): rewrite release part
Browse files Browse the repository at this point in the history
  • Loading branch information
Skraye committed Feb 11, 2025
1 parent 7b175da commit 7381b32
Show file tree
Hide file tree
Showing 9 changed files with 231 additions and 331 deletions.
146 changes: 0 additions & 146 deletions .github/actions/build-artifacts/action.yml

This file was deleted.

80 changes: 0 additions & 80 deletions .github/actions/publish-docker/action.yml

This file was deleted.

54 changes: 0 additions & 54 deletions .github/actions/publish-maven/action.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ jobs:
name: Release
needs: [tests]
uses: ./.github/workflows/workflow-release.yml
with:
docker-tag: ${{ needs.tests.outputs.docker-tag }}
plugins: ${{ needs.tests.outputs.plugins }}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/workflow-build-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
build:
name: Build - Artifacts
runs-on: ubuntu-latest
env:
PLUGIN_VERSION: ${{ github.event.inputs.plugin-version != null && github.event.inputs.plugin-version || 'LATEST' }}
steps:
- name: Checkout - Current ref
uses: actions/checkout@v4
Expand All @@ -49,7 +51,7 @@ jobs:
if: "!startsWith(github.ref, 'refs/tags/v')"
id: plugins-list
with:
plugin-version: ${{ inputs.plugin-version }}
plugin-version: ${{ env.PLUGIN_VERSION }}

# Set Plugins List
- name: Plugins - Set List
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/workflow-github-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Github - Release

on:
workflow_call:
secrets:
GH_PERSONAL_TOKEN:
description: "The Github personal token."
required: true
GITHUB_TOKEN:
description: "The Github token."
required: true

jobs:
publish:
name: Github - Release
runs-on: ubuntu-latest
steps:
# Download Exec
- name: Artifacts - Download executable
uses: actions/download-artifact@v4
if: startsWith(github.ref, 'refs/tags/v')
with:
name: exe
path: build/executable

# GitHub Release
- name: GitHub - Create release
id: create_github_release
uses: "marvinpinto/action-automatic-releases@latest"
if: startsWith(github.ref, 'refs/tags/v')
continue-on-error: true
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
build/executable/*
# Trigger gha workflow to bump helm chart version
- name: GitHub - Trigger the Helm chart version bump
uses: peter-evans/repository-dispatch@v3
if: steps.create_github_release.conclusion == 'success'
with:
token: ${{ secrets.GH_PERSONAL_TOKEN }}
repository: kestra-io/helm-charts
event-type: update-helm-chart-version
client-payload: |-
{
"new_version": "${{ github.ref_name }}",
"github_repository": "${{ github.repository }}",
"github_actor": "${{ github.actor }}"
}
Loading

0 comments on commit 7381b32

Please sign in to comment.