Skip to content

Commit f290102

Browse files
committed
feat(Initial): first package
0 parents  commit f290102

File tree

9 files changed

+1224
-0
lines changed

9 files changed

+1224
-0
lines changed

.github/workflows/CD.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
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+
uses: actions/[email protected]
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+
uses: actions/[email protected]
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+
uses: actions/[email protected]
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+

.github/workflows/CI.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
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+
uses: actions/[email protected]
21+
with:
22+
path: node_modules
23+
key: node-${{ matrix.config.system }}-${{ hashFiles('package-lock.json') }}
24+
- name: Compile
25+
run: |
26+
npm install
27+
npm run build -- version ${{ matrix.config.system }}
28+
- name: Notify slack
29+
if: failure() && github.ref == 'refs/heads/master'
30+
uses: 8398a7/action-slack@v2
31+
with:
32+
status: failure
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
36+
37+
build-mac:
38+
runs-on: macos-latest
39+
40+
steps:
41+
- uses: actions/checkout@v1
42+
- name: Cache node modules
43+
uses: actions/[email protected]
44+
with:
45+
path: node_modules
46+
key: node-darwin-${{ hashFiles('package-lock.json') }}
47+
- name: Compile
48+
run: |
49+
npm install
50+
npm run build -- version darwin
51+
- name: Notify slack
52+
if: failure() && github.ref == 'refs/heads/master'
53+
uses: 8398a7/action-slack@v2
54+
with:
55+
status: failure
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
59+
60+
build-windows:
61+
runs-on: windows-2016
62+
63+
steps:
64+
- uses: actions/checkout@v1
65+
- name: Cache node modules
66+
uses: actions/[email protected]
67+
with:
68+
path: node_modules
69+
key: node-win64-${{ hashFiles('package-lock.json') }}
70+
- name: Compile
71+
run: |
72+
npm install
73+
npm run build -- version win64
74+
- name: Notify slack
75+
if: failure() && github.ref == 'refs/heads/master'
76+
uses: 8398a7/action-slack@v2
77+
with:
78+
status: failure
79+
env:
80+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
81+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
82+
83+
semantic-release:
84+
runs-on: ubuntu-18.04
85+
needs: [build-linux, build-mac, build-windows]
86+
steps:
87+
- uses: actions/checkout@v1
88+
- run: npx semantic-release
89+
env:
90+
GITHUB_TOKEN: ${{ secrets.TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

.releaserc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"plugins": [
3+
"@semantic-release/commit-analyzer",
4+
'@semantic-release/release-notes-generator',
5+
'@semantic-release/github'
6+
]
7+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2019 - 2020 Geode-solutions
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)