Add new release
This commit is contained in:
28
.github/workflows/binary-build.yml
vendored
28
.github/workflows/binary-build.yml
vendored
@@ -71,3 +71,31 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: zurg-${{ needs.determine_version.outputs.build_version }}-${{ matrix.goos }}-${{ matrix.goarch }}.zip
|
name: zurg-${{ needs.determine_version.outputs.build_version }}-${{ matrix.goos }}-${{ matrix.goarch }}.zip
|
||||||
path: zurg-${{ needs.determine_version.outputs.build_version }}-${{ matrix.goos }}-${{ matrix.goarch }}.zip
|
path: zurg-${{ needs.determine_version.outputs.build_version }}-${{ matrix.goos }}-${{ matrix.goarch }}.zip
|
||||||
|
|
||||||
|
- 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": "release-${{ needs.determine_version.outputs.build_version }}",
|
||||||
|
"name": "Release ${{ needs.determine_version.outputs.build_version }}",
|
||||||
|
"draft": false,
|
||||||
|
"prerelease": false
|
||||||
|
}')
|
||||||
|
RELEASE_ID=$(echo "$RESPONSE" | jq ".id")
|
||||||
|
echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Upload Artifacts to other repo's release
|
||||||
|
run: |
|
||||||
|
ARTIFACTS=($(ls *.zip))
|
||||||
|
for artifact in "${ARTIFACTS[@]}"; do
|
||||||
|
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
|
||||||
|
|||||||
Reference in New Issue
Block a user