-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Support uploading tarball to release (#2646)
* CI: Support uploading tarball to release * Using environment.yml
- Loading branch information
1 parent
760c898
commit d08a478
Showing
3 changed files
with
54 additions
and
2 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
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
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
lpython_version=$(<version) | ||
|
||
cd ./dist | ||
|
||
|
||
RELEASE_ID=$(\ | ||
curl -s 'https://api.github.com/repos/lcompilers/lpython/releases/latest' | \ | ||
python -c "import sys, json; print(json.load(sys.stdin)['id'], end='')") | ||
|
||
echo "RELEASE_ID=$RELEASE_ID" | ||
|
||
curl --fail -L \ | ||
-X POST \ | ||
-H "Accept: application/vnd.github+json" \ | ||
-H "Authorization: Bearer $GITHUB_TOKEN" \ | ||
-H "X-GitHub-Api-Version: 2022-11-28" \ | ||
-H "Content-Type: application/octet-stream" \ | ||
"https://uploads.github.com/repos/lcompilers/lpython/releases/$RELEASE_ID/assets?name=lpython-${lpython_version}.tar.gz" \ | ||
--data-binary "@lpython-${lpython_version}.tar.gz" |