From 5f546686305920517960cfad5c2613c9635f39a6 Mon Sep 17 00:00:00 2001 From: TomKimsey Date: Thu, 21 Jan 2021 14:21:27 -0500 Subject: [PATCH] Added release branch action --- .../ewon-java-lib-release-branch.yml | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/ewon-java-lib-release-branch.yml diff --git a/.github/workflows/ewon-java-lib-release-branch.yml b/.github/workflows/ewon-java-lib-release-branch.yml new file mode 100644 index 0000000..a6a8fa6 --- /dev/null +++ b/.github/workflows/ewon-java-lib-release-branch.yml @@ -0,0 +1,33 @@ +# HMS Networks Solution Center +# Ewon JTK Java Library Release Branch Script for GitHub Actions +# Version: 1.0 + +name: Ewon Java Library Release Branch Builder + +on: + push: + tags: + - 'v*' # Push events to matching v*, i.e. v1.0 + +env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + +jobs: + build: + name: Create Release Branch + runs-on: ubuntu-latest + steps: + + - name: Branch name # Build a branch name from tag (vX.Y) in release/X.Y format + id: branch_name + run: | + tag="${GITHUB_REF#refs/tags/}" + tagRevision="${tag:1}" + branchPrefix="release/" + branchName="$branchPrefix$tagRevision" + echo ::set-output name=SOURCE_TAG::"$branchName" + + - name: Create Branch + uses: peterjgrainger/action-create-branch@v2.0.1 + with: + branch: ${{ steps.branch_name.outputs.SOURCE_TAG }} \ No newline at end of file