use multi level ci pipeline

This commit is contained in:
Ben Sarmiento
2023-10-28 23:19:28 +02:00
parent f0e24ed8e4
commit 2164c2353b

View File

@@ -72,6 +72,16 @@ jobs:
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
release:
needs:
- determine_version
- build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
- name: Create Release in other repo - name: Create Release in other repo
id: create_release id: create_release
run: | run: |
@@ -86,16 +96,15 @@ jobs:
"prerelease": false "prerelease": false
}') }')
RELEASE_ID=$(echo "$RESPONSE" | jq ".id") RELEASE_ID=$(echo "$RESPONSE" | jq ".id")
echo "release_id=$RELEASE_ID" >> $GITHUB_OUTPUT echo "RELEASE_ID=$RELEASE_ID" >> $GITHUB_ENV
- name: Upload Artifacts to other repo's release - name: Upload Artifacts to other repo's release
run: | run: |
ARTIFACTS=($(ls *.zip)) for artifact in $(ls -d */); do
for artifact in "${ARTIFACTS[@]}"; do
curl -s -X POST \ curl -s -X POST \
-H "Authorization: token ${{ secrets.PAT }}" \ -H "Authorization: token ${{ secrets.PAT }}" \
-H "Accept: application/vnd.github.v3+json" \ -H "Accept: application/vnd.github.v3+json" \
-H "Content-Type: $(file -b --mime-type $artifact)" \ -H "Content-Type: $(file -b --mime-type $artifact)" \
--data-binary "@$artifact" \ --data-binary "@$artifact" \
"https://uploads.github.com/repos/debridmediamanager/zurg-testing/releases/${{ steps.create_release.outputs.release_id }}/assets?name=$(basename $artifact)" "https://uploads.github.com/repos/debridmediamanager/zurg-testing/releases/${RELEASE_ID}/assets?name=$(basename $artifact)"
done done