@@ -5,50 +5,55 @@ permissions:
5
5
on :
6
6
release :
7
7
types : [published]
8
+ push :
9
+ branches : [main]
10
+ pull_request :
11
+ branches : [main]
8
12
9
13
jobs :
10
14
build :
11
15
name : Build executable 🔨
12
16
strategy :
13
17
matrix :
14
- os : [ubuntu-latest, windows-latest]
18
+ os : [ubuntu-latest, windows-latest, macos-latest ]
15
19
runs-on : ${{ matrix.os }}
16
20
17
21
steps :
18
- - uses : actions/checkout@v4
19
-
20
- - run : |
21
- git fetch --prune --unshallow --tags
22
- git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
23
-
24
- - run : pipx install poetry
25
-
26
- - uses : actions/setup-python@v4
27
- with :
28
- python-version : " 3.12"
29
- cache : ' poetry'
30
-
31
- - run : poetry install
32
-
33
- - if : matrix.os == 'ubuntu-latest'
34
- run : |
35
- shopt -s expand_aliases
36
- . ./envr.ps1
37
- build
38
-
39
- - if : matrix.os == 'windows-latest'
40
- run : |
41
- . ./envr.ps1
42
- build
43
-
44
- - name : Get name of the portable build
45
- id : get_name
46
- shell : bash
47
- run : echo "BUILD_NAME=$(ls dist | grep smpmgr-.*\.zip)" >> $GITHUB_OUTPUT
48
-
49
- - name : Upload portable build 🚀
50
- uses : svenstaro/upload-release-action@v2
51
- with :
52
- repo_token : ${{ secrets.GITHUB_TOKEN }}
53
- file : dist/${{ steps.get_name.outputs.BUILD_NAME }}
54
- tag : ${{ github.ref }}
22
+ - uses : actions/checkout@v4
23
+
24
+ - run : |
25
+ git fetch --prune --unshallow --tags
26
+ git checkout $(git describe --tags $(git rev-list --tags --max-count=1))
27
+
28
+ - run : pipx install poetry
29
+
30
+ - uses : actions/setup-python@v5
31
+ with :
32
+ python-version : " 3.12"
33
+ cache : " poetry"
34
+
35
+ - run : poetry install
36
+
37
+ - if : matrix.os != 'windows-latest'
38
+ run : |
39
+ shopt -s expand_aliases
40
+ . ./envr.ps1
41
+ build
42
+
43
+ - if : matrix.os == 'windows-latest'
44
+ run : |
45
+ . ./envr.ps1
46
+ build
47
+
48
+ - name : Get name of the portable build
49
+ id : get_name
50
+ shell : bash
51
+ run : echo "BUILD_NAME=$(ls dist | grep smpmgr-.*\.zip)" >> $GITHUB_OUTPUT
52
+
53
+ - name : Upload portable build 🚀
54
+ if : github.event_name == 'release' && github.event.action == 'published'
55
+ uses : svenstaro/upload-release-action@v2
56
+ with :
57
+ repo_token : ${{ secrets.GITHUB_TOKEN }}
58
+ file : dist/${{ steps.get_name.outputs.BUILD_NAME }}
59
+ tag : ${{ github.ref }}
0 commit comments