Skip to content

Commit

Permalink
fix(ci): update scripts/workflows for plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
fhussonnois committed Jan 31, 2025
1 parent e527f01 commit 555b769
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 7 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/release-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'The release version (e.g., 0.21.0)'
description: 'The release version (e.g., 0.21.0-RC1)'
required: true
type: string
nextVersion:
Expand All @@ -25,6 +25,15 @@ jobs:
with:
fetch-depth: 0

# Setup build
- uses: ./actions/.github/actions/setup-build
id: build
with:
java-enabled: true
node-enabled: true
python-enabled: true
caches-enabled: true

# Get Plugins List
- name: Get Plugins List
uses: ./.github/actions/plugins-list
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/tag-plugins.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Update and Tag Kestra Plugins
name: Set Version and Tag Plugins

on:
workflow_dispatch:
Expand All @@ -21,6 +21,15 @@ jobs:
with:
fetch-depth: 0

# Setup build
- uses: ./actions/.github/actions/setup-build
id: build
with:
java-enabled: true
node-enabled: true
python-enabled: true
caches-enabled: true

# Get Plugins List
- name: Get Plugins List
uses: ./.github/actions/plugins-list
Expand All @@ -29,7 +38,7 @@ jobs:
plugin-version: 'LATEST'

# Execute
- name: Tag Plugins
- name: Set Version and Tag Plugins
if: ${{ github.event.inputs.dryRun == 'false' }}
env:
GITHUB_PAT: ${{ secrets.GH_PERSONAL_TOKEN }}
Expand All @@ -40,7 +49,7 @@ jobs:
--yes \
${{ steps.plugins-list.outputs.repositories }}
- name: Run Gradle Release (DRY_RUN)
- name: Set Version and Tag Plugins (DRY_RUN)
if: ${{ github.event.inputs.dryRun == 'true' }}
env:
GITHUB_PAT: ${{ secrets.GH_PERSONAL_TOKEN }}
Expand Down
12 changes: 11 additions & 1 deletion release-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
# ./release-plugins.sh --release-version=0.20.0 --next-version=0.21.0-SNAPSHOT
# To release a specific plugin:
# ./release-plugins.sh --release-version=0.20.0 --next-version=0.21.0-SNAPSHOT plugin-kubernetes

# To release specific plugins from file:
# ./release-plugins.sh --release-version=0.20.0 --plugin-file .plugins
#===============================================================================

set -e;
Expand All @@ -43,6 +44,7 @@ usage() {
echo "Options:"
echo " --release-version <version> Specify the release version (required)."
echo " --next-version <version> Specify the next version (required)."
echo " --plugin-file File containing the plugin list (default: .plugins)"
echo " --dry-run Specify to run in DRY_RUN."
echo " -y, --yes Automatically confirm prompts (non-interactive)."
echo " -h, --help Show this help message and exit."
Expand Down Expand Up @@ -81,6 +83,14 @@ while [[ "$#" -gt 0 ]]; do
NEXT_VERSION="${1#*=}"
shift
;;
--plugin-file)
PLUGIN_FILE="$2"
shift 2
;;
--plugin-file=*)
PLUGIN_FILE="${1#*=}"
shift
;;
--dry-run)
DRY_RUN=true
shift
Expand Down
14 changes: 12 additions & 2 deletions tag-release-plugins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
# ./tag-release-plugins.sh --release-version=0.20.0
# To release a specific plugin:
# ./tag-release-plugins.sh --release-version=0.20.0 plugin-kubernetes

# To release specific plugins from file:
# ./tag-release-plugins.sh --release-version=0.20.0 --plugin-file .plugins
#===============================================================================

set -e;
Expand All @@ -40,6 +41,7 @@ usage() {
echo
echo "Options:"
echo " --release-version <version> Specify the release version (required)."
echo " --plugin-file File containing the plugin list (default: .plugins)"
echo " --dry-run Specify to run in DRY_RUN."
echo " -y, --yes Automatically confirm prompts (non-interactive)."
echo " -h, --help Show this help message and exit."
Expand Down Expand Up @@ -70,6 +72,14 @@ while [[ "$#" -gt 0 ]]; do
RELEASE_VERSION="${1#*=}"
shift
;;
--plugin-file)
PLUGIN_FILE="$2"
shift 2
;;
--plugin-file=*)
PLUGIN_FILE="${1#*=}"
shift
;;
--dry-run)
DRY_RUN=true
shift
Expand Down Expand Up @@ -163,7 +173,7 @@ do
git checkout "$RELEASE_BRANCH";

# Update version
sed -i.bak "s/^version=.*/version=$RELEASE_VERSION/" ./gradle.properties
sed -i "s/^version=.*/version=$RELEASE_VERSION/" ./gradle.properties
git add ./gradle.properties
git commit -m"chore(version): update to version 'v$RELEASE_VERSION'."
git push
Expand Down

0 comments on commit 555b769

Please sign in to comment.