From e42deb0e53204c238b4519477211e89fb58157b8 Mon Sep 17 00:00:00 2001 From: Ben Sarmiento Date: Sun, 29 Oct 2023 09:39:32 +0100 Subject: [PATCH] use action --- .github/workflows/binary-build.yml | 46 +++++++----------------------- 1 file changed, 11 insertions(+), 35 deletions(-) diff --git a/.github/workflows/binary-build.yml b/.github/workflows/binary-build.yml index c386aa2..7687b24 100644 --- a/.github/workflows/binary-build.yml +++ b/.github/workflows/binary-build.yml @@ -78,38 +78,14 @@ jobs: - name: Download all artifacts uses: actions/download-artifact@v3 - - name: Create Release in other repo - id: create_release - run: | - RESPONSE=$(curl -s -X POST \ - -H "Authorization: token ${{ secrets.PAT }}" \ - -H "Accept: application/vnd.github.v3+json" \ - https://api.github.com/repos/debridmediamanager/zurg-testing/releases \ - -d '{ - "tag_name": "${{ needs.determine_version.outputs.build_version }}", - "name": "${{ needs.determine_version.outputs.build_version }}", - "draft": false, - "prerelease": false - }') - - RELEASE_ID=$(echo "$RESPONSE" | jq ".id") - - # Set the RELEASE_ID environment variable for subsequent steps - echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT - - - name: List files - run: ls -lash *.zip - - - name: Upload Artifacts to other repo's release - run: | - for artifact in *.zip; do - echo ${{ steps.create_release.outputs.release_id }} - echo $(basename "$artifact") - echo "@$artifact" - curl -s -X POST \ - -H "Authorization: token ${{ secrets.PAT }}" \ - -H "Accept: application/vnd.github.v3+json" \ - -H "Content-Type: $(file -b --mime-type "$artifact")" \ - --data-binary "@$artifact" \ - "https://uploads.github.com/repos/debridmediamanager/zurg-testing/releases/${{ steps.create_release.outputs.release_id }}/assets?name=$(basename "$artifact")" - done + - name: Release + uses: softprops/action-gh-release@v1 + with: + name: ${{ needs.determine_version.outputs.build_version }} + tag_name: ${{ needs.determine_version.outputs.build_version }} + generate_release_notes: false + files: | + *.zip + token: ${{ secrets.PAT }} + env: + GITHUB_REPOSITORY: debridmediamanager/zurg-testing