From 577b17e0184804a5fb4899a1305bbcceebee29f7 Mon Sep 17 00:00:00 2001 From: WooSub Shin <40654598+mainmethod0126@users.noreply.github.com> Date: Sat, 28 Oct 2023 21:20:02 +0900 Subject: [PATCH] Update Gradle-Custom-Plugin-Release.yml Adding GitHub Action for deployment automation --- .github/Gradle-Custom-Plugin-Release.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.github/Gradle-Custom-Plugin-Release.yml b/.github/Gradle-Custom-Plugin-Release.yml index 3e30133..8528a6f 100644 --- a/.github/Gradle-Custom-Plugin-Release.yml +++ b/.github/Gradle-Custom-Plugin-Release.yml @@ -8,8 +8,9 @@ name: Gradle Package on: - release: - types: [created] + push: + branches: + - action-test jobs: build: @@ -18,8 +19,27 @@ jobs: permissions: contents: read packages: write + env: + VERSION: "" steps: + - name: taging + shell: bash + run: | + cp $(Pipeline.Workspace) + + # I have determined that there is no need to include metadata in the tagging information + temp_major=`node -p "const p = require('$(Pipeline.Workspace)/temp/version.json'); p.major;"` + temp_minor=`node -p "const p = require('$(Pipeline.Workspace)/temp/version.json'); p.minor;"` + temp_patch=`node -p "const p = require('$(Pipeline.Workspace)/temp/version.json'); p.patch;"` + temp_prereleaseVersion=`node -p "const p = require('$(Pipeline.Workspace)/temp/version.json'); p.prereleaseVersion;"` + + version="$temp_major$temp_minor$temp_patch$temp_prereleaseVersion" + echo "VERSION = $version" + + git tag "$version" + git push -u origin HEAD:main "$version" + - uses: actions/checkout@v3 - name: Set up JDK 11 uses: actions/setup-java@v3