From c0889ba4f3260746d5b91957bea192b3c8f2e4c7 Mon Sep 17 00:00:00 2001 From: goaaats <16760685+goaaats@users.noreply.github.com> Date: Thu, 28 Oct 2021 23:30:04 +0200 Subject: [PATCH] Create tag-build.yml --- .github/workflows/tag-build.yml | 34 +++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/tag-build.yml diff --git a/.github/workflows/tag-build.yml b/.github/workflows/tag-build.yml new file mode 100644 index 000000000..4875e9154 --- /dev/null +++ b/.github/workflows/tag-build.yml @@ -0,0 +1,34 @@ +name: Tag Build +on: [push] +concurrency: build_dalamud + +jobs: + tag: + name: Tag Build + steps: + - name: Determine Tag + id: s1 + run: | + version=$(echo $input | perl -nle 'm/build:\s*([0-9]+.[0-9]+.[0-9]+.[0-9]+)/; print $1'); + + if [ -z "$version" ]; + then + echo "No build version found"; + exit -1; + else + export D_TAG_VERSION=$version; + echo "::set-env name=D_TAG_VERSION::$D_TAG_VERSION"; + exit 0; + fi + - name: Create Tag + if: steps.s1.conclusion == 'success' + uses: actions/github-script@v3 + with: + github-token: ${{ github.token }} + script: | + github.git.createRef({ + owner: context.repo.owner, + repo: context.repo.repo, + ref: "refs/tags/${{D_TAG_VERSION}}", + sha: context.sha + })