Skip to content

Commit fb73a1a

Browse files
authored
Merge pull request #2534 from infrahq/mxyng/fix-build
maintain: continue on deb/rpm upload failure
2 parents 1036309 + 41aa11c commit fb73a1a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/publish.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ jobs:
3434
runs-on: ubuntu-latest
3535
environment: ${{ inputs.ENVIRONMENT }}
3636
steps:
37+
- uses: actions/checkout@v3
3738
- uses: aws-actions/configure-aws-credentials@v1
3839
with:
3940
aws-region: ${{ secrets.AWS_REGION }}
@@ -43,17 +44,16 @@ jobs:
4344
with:
4445
name: binaries
4546
- run: |
46-
RELEASE_ID=$(curl -fs -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository }}/releases/tags/v${{ inputs.RELEASE_NAME }} | jq -r .id)
47-
for ASSET in infra-checksums.txt *.zip *.deb *.rpm; do
48-
curl -fs -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" --data-binary @$ASSET https://uploads.github.com/repos/${{ github.repository }}/releases/$RELEASE_ID/assets?name=$(basename $ASSET)
49-
done
50-
if: ${{ inputs.ENVIRONMENT == 'production' }}
51-
continue-on-error: true
47+
gh release upload --clobber v${{ inputs.RELEASE_NAME }} *.txt *.zip *.deb *.rpm
48+
if: ${{ github.ref_type == 'tag' }}
49+
env:
50+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5251
- run: |
5352
for PACKAGE in *.deb *.rpm; do
54-
curl -fs -F package=@$PACKAGE https://${{ secrets.GEMFURY_TOKEN }}@push.fury.io/infrahq/
53+
curl -fsSL -F package=@$PACKAGE https://${{ secrets.GEMFURY_TOKEN }}@push.fury.io/infrahq/
5554
done
5655
if: ${{ inputs.ENVIRONMENT == 'production' }}
56+
continue-on-error: true
5757
- run: aws s3 sync . s3://${{ secrets.RELEASES_BUCKET }}/infra/v${{ inputs.RELEASE_NAME }} --exclude '*' --include '*.zip' --include '*.deb' --include '*.rpm' --include 'infra-checksums.txt' --acl public-read
5858
- uses: actions/download-artifact@v3
5959
with:

0 commit comments

Comments
 (0)