Skip to content

Commit 06d36c3

Browse files
committed
CI: Switch to maintained ncipollo/release-action #100
1 parent 97807b4 commit 06d36c3

File tree

1 file changed

+22
-24
lines changed

1 file changed

+22
-24
lines changed

.github/workflows/build-release.yml

+22-24
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,11 @@ jobs:
1111
- name: Create Release
1212
id: create-release
1313
if: startsWith(github.ref, 'refs/tags/v')
14-
uses: actions/create-release@v1
15-
env:
16-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
uses: ncipollo/release-action@v1
1715
with:
18-
tag_name: ${{ github.ref }}
19-
release_name: Release ${{ github.ref }}
20-
draft: false
16+
omitBody: true
2117
prerelease: true
18+
token: ${{ secrets.GITHUB_TOKEN }}
2219
build:
2320
runs-on: ${{ matrix.os }}
2421
needs: create-release
@@ -51,29 +48,30 @@ jobs:
5148
if: contains(matrix.platform, 'darwin')
5249
- name: Build ${{ matrix.platform }}
5350
id: build-release
54-
run: |
55-
./build.sh $(cat LIBVIPS_VERSION) ${{ matrix.platform }}
56-
echo "::set-output name=asset_file_name_gz::libvips-$(cat LIBVIPS_VERSION)-${{ matrix.platform }}.tar.gz"
57-
echo "::set-output name=asset_file_name_br::libvips-$(cat LIBVIPS_VERSION)-${{ matrix.platform }}.tar.br"
51+
run: ./build.sh $(cat LIBVIPS_VERSION) ${{ matrix.platform }}
5852
- name: Upload Release Asset (.tar.gz)
5953
id: upload-release-asset-gz
6054
if: startsWith(github.ref, 'refs/tags/v')
61-
uses: actions/upload-release-asset@v1
62-
env:
63-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55+
uses: ncipollo/release-action@v1
6456
with:
65-
upload_url: ${{ needs.create-release.outputs.upload_url }}
66-
asset_path: ${{ steps.build-release.outputs.asset_file_name_gz }}
67-
asset_name: ${{ steps.build-release.outputs.asset_file_name_gz }}
68-
asset_content_type: application/gzip
57+
allowUpdates: true
58+
artifact: libvips-*-${{ matrix.platform }}.tar.gz
59+
artifactContentType: application/gzip
60+
artifactErrorsFailBuild: true
61+
omitBodyDuringUpdate: true
62+
omitNameDuringUpdate: true
63+
prerelease: true
64+
token: ${{ secrets.GITHUB_TOKEN }}
6965
- name: Upload Release Asset (.tar.br)
7066
id: upload-release-asset-br
7167
if: startsWith(github.ref, 'refs/tags/v')
72-
uses: actions/upload-release-asset@v1
73-
env:
74-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
uses: ncipollo/release-action@v1
7569
with:
76-
upload_url: ${{ needs.create-release.outputs.upload_url }}
77-
asset_path: ${{ steps.build-release.outputs.asset_file_name_br }}
78-
asset_name: ${{ steps.build-release.outputs.asset_file_name_br }}
79-
asset_content_type: application/x-brotli
70+
allowUpdates: true
71+
artifact: libvips-*-${{ matrix.platform }}.tar.br
72+
artifactContentType: application/x-brotli
73+
artifactErrorsFailBuild: true
74+
omitBodyDuringUpdate: true
75+
omitNameDuringUpdate: true
76+
prerelease: true
77+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)