From a86fddded9fc0d7d3c09597f2c1a7086546cc584 Mon Sep 17 00:00:00 2001 From: samo_lego <34912839+samolego@users.noreply.github.com> Date: Tue, 11 Aug 2020 11:01:53 +0200 Subject: [PATCH] artifact uploading --- .github/workflows/ci_fabric-stable.yml | 46 +++++++++++++------------- .github/workflows/renaming.sh | 9 +++-- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci_fabric-stable.yml b/.github/workflows/ci_fabric-stable.yml index 5b828f7..9223d14 100644 --- a/.github/workflows/ci_fabric-stable.yml +++ b/.github/workflows/ci_fabric-stable.yml @@ -15,27 +15,27 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - name: Fetching branches - with: - ref: 'fabric' - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 - with: - java-version: 1.8 - - name: Grant execute permission for gradlew - run: chmod +x gradlew - - name: Build with Gradle - run: ./gradlew build - - name: Execute permission for renaming script - run: chmod +x ./.github/workflows/renaming.sh - - name: Running renaming script - run: ./.github/workflows/renaming.sh + - uses: actions/checkout@v2 + name: Fetching branches + with: + ref: 'fabric' + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Grant execute permission for gradlew + run: chmod +x gradlew + - name: Build with Gradle + run: ./gradlew build + - name: Execute permission for renaming script + run: chmod +x ./.github/workflows/renaming.sh + - name: Running renaming script + run: ./.github/workflows/renaming.sh - # Artifact upload - - name: Uploading artifacts - uses: actions/upload-artifact@v2 - with: - #name: ${{ env.BUILDNAME }}.jar - name: UNZIP_ME_${{ env.BUILDNAME }}.zip - path: build/libs/${{ env.BUILDNAME }}.jar + # Artifact upload + - name: Uploading artifacts + uses: actions/upload-artifact@v2 + with: + #name: ${{ env.BUILDNAME }}.jar + name: UNZIP_ME_${{ env.BUILDNAME }}.zip + path: build/libs/${{ env.BUILDNAME }}.jar diff --git a/.github/workflows/renaming.sh b/.github/workflows/renaming.sh index adabe26..b928194 100644 --- a/.github/workflows/renaming.sh +++ b/.github/workflows/renaming.sh @@ -7,6 +7,11 @@ mcVersion="$(grep 'minecraft_version' gradle.properties | sed 's/minecraft_versi cd ./build/libs || exit -echo "Build is going to be renamed: $projectId-$version-devbuild_$GITHUB_RUN_NUMBER-MC_$mcVersion.jar" +buildName="$projectId-$version-devbuild_$GITHUB_RUN_NUMBER-MC_$mcVersion" + +echo "Build is going to be renamed: $buildName.jar" # Renaming the dev build -mv "$projectId-$version.jar" "$projectId-$version-devbuild_$GITHUB_RUN_NUMBER-MC_$mcVersion.jar" +mv "$projectId-$version.jar" "$buildName.jar" + +#Setting the buildname for GH actions +echo "::set-env name=BUILDNAME::$buildName"