Skip to content

Commit dba264b

Browse files
committed
use gh release create
1 parent 20fb6eb commit dba264b

1 file changed

Lines changed: 12 additions & 56 deletions

File tree

.github/workflows/main.yaml

Lines changed: 12 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -195,62 +195,18 @@ jobs:
195195
zip -r linux.zip "${ARTIFACT}-linux-${NEW_VERSION}/"
196196
zip -r macos.zip "${ARTIFACT}-macos-${NEW_VERSION}/"
197197
- name: Create Release
198-
id: create_release
199-
uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0
200-
with:
201-
draft: true
202-
name: Release ${{ needs.version.outputs.new_version }}
203-
tag: v${{ needs.version.outputs.new_version }}
204-
- name: Upload Release Asset
205-
uses: shogo82148/actions-upload-release-asset@96bc1f0cb850b65efd58a6b5eaa0a69f88d38077 # v1.10.0
206-
with:
207-
asset_content_type: application/zip
208-
asset_name: ${{ env.ARTIFACT }}-linux-${{ needs.version.outputs.new_version }}.zip
209-
asset_path: ./target/linux.zip
210-
upload_url: ${{ steps.create_release.outputs.upload_url }}
211-
- name: Upload Release Asset
212-
uses: shogo82148/actions-upload-release-asset@96bc1f0cb850b65efd58a6b5eaa0a69f88d38077 # v1.10.0
213-
with:
214-
asset_content_type: application/x-executable
215-
asset_name: ${{ env.ARTIFACT }}-linux
216-
asset_path: ./target/${{ env.ARTIFACT }}-linux-${{ needs.version.outputs.new_version }}/${{ env.ARTIFACT }}-linux-${{ needs.version.outputs.new_version }}
217-
upload_url: ${{ steps.create_release.outputs.upload_url }}
218-
- name: Upload Release Asset
219-
uses: shogo82148/actions-upload-release-asset@96bc1f0cb850b65efd58a6b5eaa0a69f88d38077 # v1.10.0
220-
with:
221-
asset_content_type: application/zip
222-
asset_name: ${{ env.ARTIFACT }}-windows-${{ needs.version.outputs.new_version }}.zip
223-
asset_path: ./target/windows.zip
224-
upload_url: ${{ steps.create_release.outputs.upload_url }}
225-
- name: Upload Release Asset
226-
uses: shogo82148/actions-upload-release-asset@96bc1f0cb850b65efd58a6b5eaa0a69f88d38077 # v1.10.0
227-
with:
228-
asset_content_type: application/vnd.microsoft.portable-executable
229-
asset_name: ${{ env.ARTIFACT }}-windows.exe
230-
asset_path: ./target/${{ env.ARTIFACT }}-windows-${{ needs.version.outputs.new_version }}/${{ env.ARTIFACT }}-windows-${{ needs.version.outputs.new_version }}.exe
231-
upload_url: ${{ steps.create_release.outputs.upload_url }}
232-
- name: Upload Release Asset
233-
uses: shogo82148/actions-upload-release-asset@96bc1f0cb850b65efd58a6b5eaa0a69f88d38077 # v1.10.0
234-
with:
235-
asset_content_type: application/zip
236-
asset_name: ${{ env.ARTIFACT }}-macos-${{ needs.version.outputs.new_version }}.zip
237-
asset_path: ./target/macos.zip
238-
upload_url: ${{ steps.create_release.outputs.upload_url }}
239-
- name: Upload Release Asset
240-
uses: shogo82148/actions-upload-release-asset@96bc1f0cb850b65efd58a6b5eaa0a69f88d38077 # v1.10.0
241-
with:
242-
asset_content_type: application/octet-stream
243-
asset_name: ${{ env.ARTIFACT }}-macos
244-
asset_path: ./target/${{ env.ARTIFACT }}-macos-${{ needs.version.outputs.new_version }}/${{ env.ARTIFACT }}-macos-${{ needs.version.outputs.new_version }}
245-
upload_url: ${{ steps.create_release.outputs.upload_url }}
246-
- uses: ncipollo/release-action@339a81892b84b4eeb0f6e744e4574d79d0d9b8dd # v1.21.0
247-
with:
248-
allowUpdates: true
249-
immutableCreate: true
250-
omitBodyDuringUpdate: true
251-
omitNameDuringUpdate: true
252-
tag: v${{ needs.version.outputs.new_version }}
253-
updateOnlyUnreleased: true
198+
env:
199+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
200+
NEW_VERSION: ${{ needs.version.outputs.new_version }}
201+
run: |
202+
gh release create "v${NEW_VERSION}" \
203+
--title "Release ${NEW_VERSION}" \
204+
"./target/linux.zip#${ARTIFACT}-linux-${NEW_VERSION}.zip" \
205+
"./target/${ARTIFACT}-linux-${NEW_VERSION}/${ARTIFACT}-linux-${NEW_VERSION}#${ARTIFACT}-linux" \
206+
"./target/windows.zip#${ARTIFACT}-windows-${NEW_VERSION}.zip" \
207+
"./target/${ARTIFACT}-windows-${NEW_VERSION}/${ARTIFACT}-windows-${NEW_VERSION}.exe#${ARTIFACT}-windows.exe" \
208+
"./target/macos.zip#${ARTIFACT}-macos-${NEW_VERSION}.zip" \
209+
"./target/${ARTIFACT}-macos-${NEW_VERSION}/${ARTIFACT}-macos-${NEW_VERSION}#${ARTIFACT}-macos"
254210
- name: Make sure build did not change anything
255211
run: git diff --exit-code
256212
deploy:

0 commit comments

Comments
 (0)