File tree 3 files changed +54
-2
lines changed
3 files changed +54
-2
lines changed Original file line number Diff line number Diff line change @@ -493,3 +493,32 @@ jobs:
493
493
run : |
494
494
cd integration_tests
495
495
./run_tests.py -b cpython c_py
496
+
497
+ upload_tarball :
498
+ name : Upload Tarball
499
+ runs-on : ubuntu-latest
500
+ steps :
501
+ - uses : actions/checkout@v4
502
+ with :
503
+ fetch-depth : 0
504
+
505
+ - uses : mamba-org/setup-micromamba@v1
506
+ with :
507
+ environment-file : ci/environment.yml
508
+ create-args : >-
509
+ python=3.10
510
+
511
+ - name : Create Source Tarball
512
+ shell : bash -e -l {0}
513
+ run : |
514
+ ./build0.sh
515
+ lpython_version=$(<version)
516
+ ci/create_source_tarball.sh $lpython_version
517
+
518
+ - name : Upload Tarball to Release
519
+ if : ${{ startsWith(github.ref, 'refs/tags/v') }}
520
+ shell : bash -e -l {0}
521
+ run : |
522
+ ci/upload_tarball_to_release.sh
523
+ env :
524
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 2
2
3
3
set -ex
4
4
5
- lfortran_version =$1
6
- export dest=lfortran- $lfortran_version
5
+ lpython_version =$1
6
+ export dest=lpython- $lpython_version
7
7
bash -x -o errexit ci/create_source_tarball0.sh
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -ex
4
+
5
+ lpython_version=$( < version)
6
+
7
+ cd ./dist
8
+
9
+
10
+ RELEASE_ID=$( \
11
+ curl -s ' https://api.github.com/repos/lcompilers/lpython/releases/latest' | \
12
+ python -c " import sys, json; print(json.load(sys.stdin)['id'], end='')" )
13
+
14
+ echo " RELEASE_ID=$RELEASE_ID "
15
+
16
+ curl --fail -L \
17
+ -X POST \
18
+ -H " Accept: application/vnd.github+json" \
19
+ -H " Authorization: Bearer $GITHUB_TOKEN " \
20
+ -H " X-GitHub-Api-Version: 2022-11-28" \
21
+ -H " Content-Type: application/octet-stream" \
22
+ " https://uploads.github.com/repos/lcompilers/lpython/releases/$RELEASE_ID /assets?name=lpython-${lpython_version} .tar.gz" \
23
+ --data-binary " @lpython-${lpython_version} .tar.gz"
You can’t perform that action at this time.
0 commit comments