Make package publishing resilient [skip ci]
This commit is contained in:
@@ -90,16 +90,6 @@ jobs:
|
|||||||
cd dist
|
cd dist
|
||||||
sha256sum ./*.tar.gz > SHA256SUMS
|
sha256sum ./*.tar.gz > SHA256SUMS
|
||||||
|
|
||||||
- name: Upload build artifacts
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: bdrclone-build-${{ github.run_number }}
|
|
||||||
path: |
|
|
||||||
dist/*.tar.gz
|
|
||||||
dist/SHA256SUMS
|
|
||||||
if-no-files-found: error
|
|
||||||
retention-days: 30
|
|
||||||
|
|
||||||
- name: Publish Gitea package
|
- name: Publish Gitea package
|
||||||
if: startsWith(github.ref, 'refs/tags/v') || inputs.publish_version != ''
|
if: startsWith(github.ref, 'refs/tags/v') || inputs.publish_version != ''
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -119,6 +109,8 @@ jobs:
|
|||||||
|
|
||||||
for package_file in dist/*.tar.gz dist/SHA256SUMS; do
|
for package_file in dist/*.tar.gz dist/SHA256SUMS; do
|
||||||
curl --fail-with-body --silent --show-error \
|
curl --fail-with-body --silent --show-error \
|
||||||
|
--retry 5 --retry-all-errors --retry-delay 3 \
|
||||||
|
--connect-timeout 20 --max-time 300 \
|
||||||
--request PUT \
|
--request PUT \
|
||||||
--header "Authorization: token $GITEA_TOKEN" \
|
--header "Authorization: token $GITEA_TOKEN" \
|
||||||
--upload-file "$package_file" \
|
--upload-file "$package_file" \
|
||||||
@@ -126,6 +118,19 @@ jobs:
|
|||||||
done
|
done
|
||||||
|
|
||||||
curl --fail-with-body --silent --show-error \
|
curl --fail-with-body --silent --show-error \
|
||||||
|
--retry 5 --retry-all-errors --retry-delay 3 \
|
||||||
|
--connect-timeout 20 --max-time 300 \
|
||||||
--request POST \
|
--request POST \
|
||||||
--header "Authorization: token $GITEA_TOKEN" \
|
--header "Authorization: token $GITEA_TOKEN" \
|
||||||
"$GITEA_SERVER_URL/api/v1/packages/$GITEA_OWNER/generic/bdrclone/-/link/$repository_name"
|
"$GITEA_SERVER_URL/api/v1/packages/$GITEA_OWNER/generic/bdrclone/-/link/$repository_name"
|
||||||
|
|
||||||
|
- name: Upload temporary build artifacts
|
||||||
|
continue-on-error: true
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: bdrclone-build-${{ github.run_number }}
|
||||||
|
path: |
|
||||||
|
dist/*.tar.gz
|
||||||
|
dist/SHA256SUMS
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 30
|
||||||
|
|||||||
Reference in New Issue
Block a user