File tree Expand file tree Collapse file tree 3 files changed +66
-18
lines changed Expand file tree Collapse file tree 3 files changed +66
-18
lines changed Original file line number Diff line number Diff line change
1
+ name : ' [CI] Build Release'
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - ' **'
7
+
8
+ env :
9
+ MINICONDA_PYTHON_VERSION : py38
10
+ MINICONDA_VERSION : 4.11.0
11
+
12
+ defaults :
13
+ run :
14
+ working-directory : pyscriptjs
15
+
16
+ jobs :
17
+ build :
18
+ runs-on : ubuntu-latest
19
+ steps :
20
+
21
+ - name : Checkout
22
+ uses : actions/checkout@v3
23
+
24
+ - name : Install node
25
+ uses : actions/setup-node@v3
26
+ with :
27
+ node-version : 18.x
28
+
29
+ - name : Cache node modules
30
+ uses : actions/cache@v3
31
+ env :
32
+ cache-name : cache-node-modules
33
+ with :
34
+ # npm cache files are stored in `~/.npm` on Linux/macOS
35
+ path : ~/.npm
36
+ key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
37
+ restore-keys : |
38
+ ${{ runner.os }}-build-${{ env.cache-name }}-
39
+ ${{ runner.os }}-build-
40
+ ${{ runner.os }}-
41
+
42
+ - name : setup Miniconda
43
+ uses : conda-incubator/setup-miniconda@v2
44
+
45
+ - name : Setup Environment
46
+ run : make setup
47
+
48
+ - name : Build and Test
49
+ run : make test
50
+
51
+ - name : Prepare Release
52
+ uses : softprops/action-gh-release@v1
53
+ with :
54
+ draft : true
55
+ prerelease : true
56
+ generate_release_notes : true
Original file line number Diff line number Diff line change 1
1
name : ' [Docs] Build Release'
2
2
3
3
on :
4
- # Any time a tag or branch is created
5
- # https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#create
6
- create :
7
- paths :
8
- - docs/**
4
+ release :
5
+ types : [published]
9
6
10
7
jobs :
11
8
build :
12
- if : startsWith(github.ref, 'refs/tags') # Only if tagged
13
9
runs-on : ubuntu-latest
14
10
permissions :
15
11
contents : read
Original file line number Diff line number Diff line change 1
- name : ' [CI] Build Alpha '
1
+ name : ' [CI] Publish Release '
2
2
3
3
on :
4
- push :
5
- tags :
6
- - ' **' # Currently any tag, need to slim down
7
- paths :
8
- - pyscriptjs/**
4
+ release :
5
+ types : [published]
9
6
10
7
env :
11
8
MINICONDA_PYTHON_VERSION : py38
22
19
contents : read
23
20
id-token : write
24
21
steps :
25
-
26
22
- name : Checkout
27
23
uses : actions/checkout@v3
28
24
@@ -53,14 +49,14 @@ jobs:
53
49
- name : Build and Test
54
50
run : make test
55
51
56
- # Deploy to S3
52
+ # Upload to S3
57
53
- name : Configure AWS credentials
58
- if : github.ref == 'refs/heads/main' # Only deploy on merge into main
59
54
uses : aws-actions/configure-aws-credentials@v1.6.1
60
55
with :
61
56
aws-region : ${{secrets.AWS_REGION}}
62
57
role-to-assume : ${{ secrets.AWS_OIDC_RUNNER_ROLE }}
63
58
64
- - name : Sync to S3
65
- if : github.ref == 'refs/heads/main'
66
- run : aws s3 sync --quiet ./examples/build/ s3://pyscript.net/alpha/
59
+ # - name: Sync to S3
60
+ # run: | # Overwrite "latest" alpha + versioned subdirectory
61
+ # aws s3 sync --quiet ./examples/build/ s3://pyscript.net/alpha/${{ github.ref_name }}
62
+ # aws s3 sync --quiet ./examples/build/ s3://pyscript.net/alpha/
You can’t perform that action at this time.
0 commit comments