-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(pipeline): Fix release asset upload
- Loading branch information
Showing
1 changed file
with
44 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -293,51 +293,57 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | ||
run: npx semantic-release | ||
|
||
- name: Get release | ||
id: get_release | ||
uses: bruceadams/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
|
||
- name: Upload the x86 built binaries to the release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ./target/x86_64-unknown-linux-musl/release/this-week-in-past | ||
asset_name: this-week-in-past-x86_64-unknown-linux-musl | ||
asset_content_type: application/x-executable | ||
run: | | ||
ASSETS_URL=$(curl -s https://api.github.com/repos/RouHim/this-week-in-past/releases/latest | jq '.assets_url') | ||
NAME=this-week-in-past-x86_64-unknown-linux-musl | ||
PATH=./target/x86_64-unknown-linux-musl/release/this-week-in-past | ||
curl \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
--data-binary "@${PATH}" \ | ||
${ASSETS_URL}?name=${NAME} | ||
- name: Upload the aarch64 built binaries to the release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ./target/aarch64-unknown-linux-musl/release/this-week-in-past | ||
asset_name: this-week-in-past-aarch64-unknown-linux-musl | ||
asset_content_type: application/x-executable | ||
run: | | ||
ASSETS_URL=$(curl -s https://api.github.com/repos/RouHim/this-week-in-past/releases/latest | jq '.assets_url') | ||
NAME=this-week-in-past-aarch64-unknown-linux-musl | ||
PATH=./target/aarch64-unknown-linux-musl/release/this-week-in-past | ||
curl \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
--data-binary "@${PATH}" \ | ||
${ASSETS_URL}?name=${NAME} | ||
- name: Upload the armv7 built binaries to the release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ./target/armv7-unknown-linux-musleabihf/release/this-week-in-past | ||
asset_name: this-week-in-past-armv7-unknown-linux-musleabihf | ||
asset_content_type: application/x-executable | ||
run: | | ||
ASSETS_URL=$(curl -s https://api.github.com/repos/RouHim/this-week-in-past/releases/latest | jq '.assets_url') | ||
NAME=this-week-in-past-armv7-unknown-linux-musleabihf | ||
PATH=./target/armv7-unknown-linux-musleabihf/release/this-week-in-past | ||
curl \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
--data-binary "@${PATH}" \ | ||
${ASSETS_URL}?name=${NAME} | ||
- name: Upload the arm v6 built binaries to the release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ./target/arm-unknown-linux-musleabihf/release/this-week-in-past | ||
asset_name: this-week-in-past-arm-unknown-linux-musleabihf | ||
asset_content_type: application/x-executable | ||
run: | | ||
ASSETS_URL=$(curl -s https://api.github.com/repos/RouHim/this-week-in-past/releases/latest | jq '.assets_url') | ||
NAME=this-week-in-past-arm-unknown-linux-musleabihf | ||
PATH=./target/arm-unknown-linux-musleabihf/release/this-week-in-past | ||
curl \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}"\ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
--data-binary "@${PATH}" \ | ||
${ASSETS_URL}?name=${NAME} | ||
publish-container-images: | ||
|