From 1108323830177d73cd261158b6e2942ebd70bbe2 Mon Sep 17 00:00:00 2001 From: C0D3 M4513R <28912031+C0D3-M4513R@users.noreply.github.com> Date: Tue, 16 Jan 2024 21:17:42 +0100 Subject: [PATCH] Disable Releases - Testing only2 --- .github/workflows/build_and_release.yml | 27 ++++++------------------- .github/workflows/tagging.sh | 21 +++++++++++++++++++ 2 files changed, 27 insertions(+), 21 deletions(-) create mode 100755 .github/workflows/tagging.sh diff --git a/.github/workflows/build_and_release.yml b/.github/workflows/build_and_release.yml index 33fc103f5..1ebe2446b 100644 --- a/.github/workflows/build_and_release.yml +++ b/.github/workflows/build_and_release.yml @@ -85,27 +85,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Tag repo id: tag - run: | - function getVer(){ - IFS='=' read -ra ARR <<<$(grep $1 gradle.properties) - read -r -d '' "$1" <<< ${ARR[1]} - unset IFS - unset ARR - } - getVer MC_VERSION - echo "Got MC_VERSION: $MC_VERSION" - getVer FORGE_VERSION - echo "Got FORGE_VERSION: $FORGE_VERSION" - getVer KETTING_VERSION - echo "Got KETTING_VERSION: $KETTING_VERSION" - tag=v$MC_VERSION-$FORGE_VERSION-$KETTING_VERSION - echo "Got tag $tag" - echo "tag=$tag" >> "$GITHUB_OUTPUT" - echo "Set tag as output" - git tag $tag - echo "Created local tag" - git push origin $tag - echo "Pushed to remote" + run: bash .github/workflows/tagging.sh env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Create Github Release if on default branch @@ -143,6 +123,11 @@ jobs: - name: Rename Branch, if Pull_Request if: ${{ github.event_name == 'pull_request' }} run: git checkout -B 'branch' + - name: Tag repo + id: tag + run: bash .github/workflows/tagging.sh + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Setup Java 17 uses: actions/setup-java@v3 with: diff --git a/.github/workflows/tagging.sh b/.github/workflows/tagging.sh new file mode 100755 index 000000000..7dc97492c --- /dev/null +++ b/.github/workflows/tagging.sh @@ -0,0 +1,21 @@ +#!/usr/bin/env bash +getVer(){ + IFS='=' read -ra ARR <<< "$(grep "$1" gradle.properties)" + read -r -d '' "$1" <<< "${ARR[1]}" + unset IFS + unset ARR +} +getVer MC_VERSION +echo "Got MC_VERSION: $MC_VERSION" +getVer FORGE_VERSION +echo "Got FORGE_VERSION: $FORGE_VERSION" +getVer KETTING_VERSION +echo "Got KETTING_VERSION: $KETTING_VERSION" +tag=v$MC_VERSION-$FORGE_VERSION-$KETTING_VERSION +echo "Got tag $tag" +#echo "tag=$tag" >> "$GITHUB_OUTPUT" +echo "Set tag as output" +#git tag "$tag" +echo "Created local tag" +#git push origin "$tag" +echo "Pushed to remote" \ No newline at end of file