File tree Expand file tree Collapse file tree 4 files changed +65
-6
lines changed
Expand file tree Collapse file tree 4 files changed +65
-6
lines changed Original file line number Diff line number Diff line change 11name : Build - Linux
22
33on :
4- - push
4+ push :
5+ branches :
6+ - main
7+ workflow_call :
58
69jobs :
710 build :
11+ if : github.repository == 'iOSRealRun-cli/iOSRealRun-cli'
812 strategy :
913 matrix :
1014 os : [ubuntu-latest]
4953 - name : Upload Artifacts
5054 uses : actions/upload-artifact@v3
5155 with :
52- name : ${{ runner.os }} - ${{ matrix.arch }} Build
56+ name : iOSRealRun-cli- ${{ runner.os }}- ${{ matrix.arch }}
5357 path : |
5458 output/
Original file line number Diff line number Diff line change 11name : Build - MacOS
22
33on :
4- - push
4+ push :
5+ branches :
6+ - main
7+ workflow_call :
58
69jobs :
710 build :
11+ if : github.repository == 'iOSRealRun-cli/iOSRealRun-cli'
812 strategy :
913 matrix :
1014 os : [macos-latest]
5054 - name : Upload Artifacts
5155 uses : actions/upload-artifact@v3
5256 with :
53- name : ${{ runner.os }} - ${{ matrix.arch }} Build
57+ name : iOSRealRun-cli- ${{ runner.os }}- ${{ matrix.arch }}
5458 path : |
5559 output/
Original file line number Diff line number Diff line change 11name : Build - Windows
22
33on :
4- - push
4+ push :
5+ branches :
6+ - main
7+ workflow_call :
58
69jobs :
710 build :
11+ if : github.repository == 'iOSRealRun-cli/iOSRealRun-cli'
812 strategy :
913 matrix :
1014 os : [windows-latest]
4953 - name : Upload Artifacts
5054 uses : actions/upload-artifact@v3
5155 with :
52- name : ${{ runner.os }} - ${{ matrix.arch }} Build
56+ name : iOSRealRun-cli- ${{ runner.os }}- ${{ matrix.arch }}
5357 path : |
5458 output/
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ release :
5+ types : [ published ]
6+
7+ permissions : write-all
8+
9+ jobs :
10+ build-win :
11+ uses : ./.github/workflows/build_win.yml
12+ build-linux :
13+ uses : ./.github/workflows/build_linux.yml
14+ build-macos :
15+ uses : ./.github/workflows/build_macos.yml
16+ release :
17+ needs :
18+ - build-win
19+ - build-linux
20+ - build-macos
21+ runs-on : ubuntu-latest
22+ steps :
23+ - name : Checkout codebase
24+ uses : actions/checkout@v3
25+ - name : Download artifacts
26+ uses : actions/download-artifact@v3
27+ - name : zip
28+ run : |
29+ for dir in iOSRealRun-cli*; do
30+ if [ -d "$dir" ]; then
31+ echo "------ Zip $dir ----------"
32+ (cd $dir && zip -r9 "$dir".zip ./* && mv "$dir".zip ../)
33+ fi
34+ done
35+ - name : Display structure of downloaded files
36+ run : ls -R
37+ - name : Upload Release
38+ if : github.event_name == 'release'
39+ env :
40+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
41+ run : |
42+ for file in iOSRealRun-cli*.zip; do
43+ if [ -f "$file" ]; then
44+ echo "------ Upload $file ----------"
45+ gh release upload ${{ github.event.release.tag_name }} "$file"
46+ fi
47+ done
You can’t perform that action at this time.
0 commit comments