File tree Expand file tree Collapse file tree 1 file changed +73
-0
lines changed
Expand file tree Collapse file tree 1 file changed +73
-0
lines changed Original file line number Diff line number Diff line change 1+ name : build-and-release
2+
3+ on :
4+ push :
5+ branches : [main]
6+ pull_request :
7+ branches : [main]
8+
9+ defaults :
10+ run :
11+ shell : bash
12+
13+ jobs :
14+ build :
15+ runs-on : ${{ matrix.os }}
16+ strategy :
17+ matrix :
18+ os : [macos-latest, ubuntu-18.04, windows-latest]
19+ steps :
20+ - name : checkout repo
21+ uses : actions/checkout@v2
22+ - name : Install git sdk
23+ if : ${{ matrix.os == 'windows-latest' }}
24+ uses : git-for-windows/setup-git-for-windows-sdk@v1
25+ with :
26+ flavor : full
27+
28+ - name : Set CFLAGS for macOS compatibility
29+ if : ${{ matrix.os == 'macos-latest' }}
30+ run : |
31+ echo "CFLAGS=-mmacosx-version-min=10.13" >> $GITHUB_ENV
32+ echo "MACOSX_DEPLOYMENT_TARGET=10.13" >> $GITHUB_ENV
33+
34+ - name : build library
35+ run : ./make-ci.sh
36+
37+ - name : Test
38+ run : make test
39+
40+ - name : upload result
41+ uses : actions/upload-artifact@v2
42+ with :
43+ name : build-${{ matrix.os }}
44+ path : dist/*.tar.bz2
45+
46+ deploy :
47+ runs-on : ubuntu-latest
48+ needs : [build]
49+ steps :
50+ - name : Download build artifacts
51+ uses : actions/download-artifact@v2
52+ id : download
53+ with :
54+ path : ~/downloads
55+
56+ - name : Create tarball dir
57+ run : mkdir tarballs
58+
59+ - name : Collect all artifacts
60+ run : find ${{steps.download.outputs.download-path}} -type f -exec mv {} tarballs \;
61+
62+ - name : Display structure of downloaded files
63+ run : ls -R
64+
65+ - name : Release result
66+ uses :
marvinpinto/[email protected] 67+ with :
68+ repo_token : " ${{ secrets.GITHUB_TOKEN }}"
69+ automatic_release_tag : " latest"
70+ prerelease : true
71+ title : " Development Build"
72+ files : |
73+ tarballs/*.tar.bz2
You can’t perform that action at this time.
0 commit comments