1+ name : CD
2+
3+ on :
4+ push :
5+ tags : ' v*'
6+
7+ jobs :
8+ build-linux :
9+ runs-on : ubuntu-18.04
10+ container : ${{ matrix.config.container }}
11+ strategy :
12+ matrix :
13+ config :
14+ - {container: "geodesolutions/ubuntu", system: ubuntu}
15+ - {container: "geodesolutions/centos", system: rhel}
16+
17+ steps :
18+ - uses : actions/checkout@v1
19+ - name : Cache node modules
20+ 21+ with :
22+ path : node_modules
23+ key : node-${{ matrix.config.system }}-${{ hashFiles('package-lock.json') }}
24+ - name : Generate package
25+ id : package
26+ run : |
27+ version="${GITHUB_REF##*/*/}"
28+ echo ::set-output name=version::$version
29+ npm install
30+ npm run build -- $version ${{ matrix.config.system }}
31+ - name : Upload
32+ uses : softprops/action-gh-release@v1
33+ with :
34+ files : " GeodePackage-${{ steps.package.outputs.version }}-${{ matrix.config.system }}.zip"
35+ env :
36+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
37+ - name : Notify slack
38+ if : failure() && github.ref == 'refs/heads/master'
39+ uses : 8398a7/action-slack@v2
40+ with :
41+ status : failure
42+ env :
43+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
44+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
45+
46+ build-mac :
47+ runs-on : macos-latest
48+
49+ steps :
50+ - uses : actions/checkout@v1
51+ - name : Cache node modules
52+ 53+ with :
54+ path : node_modules
55+ key : node-darwin-${{ hashFiles('package-lock.json') }}
56+ - name : Generate package
57+ id : package
58+ run : |
59+ version="${GITHUB_REF##*/*/}"
60+ echo ::set-output name=version::$version
61+ npm install
62+ npm run build -- $version darwin
63+ - name : Upload
64+ uses : softprops/action-gh-release@v1
65+ with :
66+ files : " GeodePackage-${{ steps.package.outputs.version }}-darwin.zip"
67+ env :
68+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
69+ - name : Notify slack
70+ if : failure() && github.ref == 'refs/heads/master'
71+ uses : 8398a7/action-slack@v2
72+ with :
73+ status : failure
74+ env :
75+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
76+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
77+
78+ build-windows :
79+ runs-on : windows-2016
80+
81+ steps :
82+ - uses : actions/checkout@v1
83+ - name : Cache node modules
84+ 85+ with :
86+ path : node_modules
87+ key : node-win64-${{ hashFiles('package-lock.json') }}
88+ - name : Generate package
89+ id : package
90+ run : |
91+ $version = ${env:GITHUB_REF} -replace 'refs\/tags\/', ''
92+ echo "::set-output name=version::$version"
93+ npm install
94+ npm run build -- $version win64
95+ - name : Upload
96+ uses : softprops/action-gh-release@v1
97+ with :
98+ files : " GeodePackage-${{ steps.package.outputs.version }}-win64.zip"
99+ env :
100+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
101+ - name : Notify slack
102+ if : failure() && github.ref == 'refs/heads/master'
103+ uses : 8398a7/action-slack@v2
104+ with :
105+ status : failure
106+ env :
107+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
108+ SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
109+
0 commit comments