From a1c88514e310fef5500f89171497482245cf0959 Mon Sep 17 00:00:00 2001 From: B3none <24966460+B3none@users.noreply.github.com> Date: Sun, 1 Sep 2024 20:05:39 +0100 Subject: [PATCH] Update plugin-build.yml --- .github/workflows/plugin-build.yml | 34 ++++++++++-------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/.github/workflows/plugin-build.yml b/.github/workflows/plugin-build.yml index a7c2734..7ae90c3 100644 --- a/.github/workflows/plugin-build.yml +++ b/.github/workflows/plugin-build.yml @@ -57,37 +57,25 @@ jobs: permissions: write-all runs-on: ubuntu-latest if: github.event_name == 'release' - + steps: - name: Download build artifact uses: actions/download-artifact@v4 with: name: RetakesPlugin-${{ github.sha }} + - name: Create release assets run: | - zip -r RetakesPlugin-${{ github.sha }}.zip ./RetakesPlugin + zip -r RetakesPlugin.zip ./RetakesPlugin rm -rf ./RetakesPlugin/map_config - zip -r RetakesPlugin-${{ github.sha }}-no-map-configs.zip ./RetakesPlugin - - name: Get release info - run: | - RELEASE_INFO=$(curl -sH 'Accept: application/vnd.github.v3+json' https://api.github.com/repos/${{ github.repository }}/releases) - export UPLOAD_URL=$(echo $RELEASE_INFO | jq -r ".[] | select(.tag_name == \"${{ github.event.release.tag_name }}\").upload_url") - echo "UPLOAD_URL=$UPLOAD_URL" >> $GITHUB_ENV - - name: Upload release asset - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + zip -r RetakesPlugin-no-map-configs.zip ./RetakesPlugin + + - name: Upload release assets + uses: softprops/action-gh-release@v2 with: - upload_url: ${{ env.UPLOAD_URL }} - asset_path: ./RetakesPlugin-${{ github.sha }}.zip - asset_name: "cs2-retakes-${{ github.event.release.tag_name }}.zip" - asset_content_type: application/zip - - name: Upload release asset (no map configs) - uses: actions/upload-release-asset@v1 + files: | + ./RetakesPlugin.zip + ./RetakesPlugin-no-map-configs.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ env.UPLOAD_URL }} - asset_path: ./RetakesPlugin-${{ github.sha }}-no-map-configs.zip - asset_name: "cs2-retakes-${{ github.event.release.tag_name }}-no-map-configs.zip" - asset_content_type: application/zip +