File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 34
34
runs-on : ubuntu-latest
35
35
environment : ${{ inputs.ENVIRONMENT }}
36
36
steps :
37
+ - uses : actions/checkout@v3
37
38
- uses : aws-actions/configure-aws-credentials@v1
38
39
with :
39
40
aws-region : ${{ secrets.AWS_REGION }}
@@ -43,17 +44,16 @@ jobs:
43
44
with :
44
45
name : binaries
45
46
- 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 }}
52
51
- run : |
53
52
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/
55
54
done
56
55
if: ${{ inputs.ENVIRONMENT == 'production' }}
56
+ continue-on-error: true
57
57
- 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
58
58
- uses : actions/download-artifact@v3
59
59
with :
You can’t perform that action at this time.
0 commit comments