From 5b0f7c69a669f0553b95decafd444d0a7480d7a2 Mon Sep 17 00:00:00 2001 From: Alex Hawk Date: Fri, 12 Feb 2021 08:49:15 -0500 Subject: [PATCH] Add library release branch builder --- .../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..fc23779 --- /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