Skip to content

Commit 54d96ad

Browse files
committed
Merge branch 'master' into develop
2 parents c7b5e42 + fb81e9b commit 54d96ad

File tree

10 files changed

+694
-473
lines changed

10 files changed

+694
-473
lines changed

.github/workflows/build.yml

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
- staging
6+
- develop
7+
8+
name: Continuous integration
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- run: git fetch --all --tags
17+
18+
- name: Setup nodejs
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: '12.x'
22+
23+
- name: Check Release Version
24+
uses: thebongy/version-check@v1
25+
with:
26+
file: package.json
27+
id: version_check
28+
29+
- name: Install dependencies
30+
run: npm ci
31+
32+
- name: Linting and Test
33+
run: npm run test:prod
34+
35+
- name: Run Build
36+
run: npm run build
37+
38+
- name: Create tarball
39+
run: npm pack
40+
41+
- name: Upload Artifact
42+
uses: actions/upload-artifact@v2
43+
with:
44+
name: juno-node-${{ steps.version_check.outputs.releaseVersion }}
45+
path: ./juno-node-${{ steps.version_check.outputs.rawVersion }}.tgz
46+
47+
# Publish release on push to master
48+
release-master:
49+
if: github.ref == 'refs/heads/master'
50+
runs-on: ubuntu-latest
51+
needs: build
52+
steps:
53+
- uses: actions/checkout@v2
54+
- run: git fetch --all --tags
55+
56+
- name: Check Release Version
57+
id: version_check
58+
uses: thebongy/version-check@v1
59+
with:
60+
file: package.json
61+
tagFormat: v${version}
62+
63+
- name: Setup nodejs
64+
uses: actions/setup-node@v1
65+
with:
66+
node-version: '12.x'
67+
registry-url: 'https://registry.npmjs.org'
68+
69+
- name: Publish Release
70+
id: create_release
71+
uses: actions/create-release@latest
72+
with:
73+
tag_name: ${{ steps.version_check.outputs.releaseVersion }}
74+
release_name: juno-node-${{ steps.version_check.outputs.releaseVersion }}
75+
prerelease: false
76+
env:
77+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78+
79+
- name: Download Artifact
80+
uses: actions/download-artifact@v2
81+
with:
82+
name: juno-node-${{ steps.version_check.outputs.rawVersion }}
83+
84+
- name: Upload Release Asset
85+
uses: actions/upload-release-asset@v1
86+
env:
87+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
88+
with:
89+
upload_url: ${{ steps.create_release.outputs.upload_url }}
90+
asset_path: juno-node-${{ steps.version_check.outputs.rawVersion }}.tgz
91+
asset_name: juno-node-${{ steps.version_check.outputs.releaseVersion }}.tgz
92+
asset_content_type: application/tgz
93+
94+
- name: Publish to npm
95+
run: npm publish juno-node-${{ steps.version_check.outputs.rawVersion }}.tgz
96+
env:
97+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
98+
99+
release-staging:
100+
if: github.ref == 'refs/heads/staging'
101+
runs-on: ubuntu-latest
102+
needs: build
103+
steps:
104+
- uses: actions/checkout@v2
105+
- run: git fetch --all --tags
106+
107+
- name: Check Release Version
108+
id: version_check
109+
uses: thebongy/version-check@v1
110+
with:
111+
file: package.json
112+
tagFormat: v${version}-beta
113+
114+
- name: Setup nodejs
115+
uses: actions/setup-node@v1
116+
with:
117+
node-version: '12.x'
118+
registry-url: 'https://registry.npmjs.org'
119+
120+
- name: Download Artifact
121+
uses: actions/download-artifact@v2
122+
with:
123+
name: juno-node-${{ steps.version_check.outputs.releaseVersion }}
124+
125+
- name: Publish Release
126+
id: create_release
127+
uses: actions/create-release@latest
128+
with:
129+
tag_name: ${{ steps.version_check.outputs.releaseVersion }}
130+
release_name: juno-node-${{ steps.version_check.outputs.releaseVersion }}
131+
prerelease: true
132+
env:
133+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
134+
135+
- name: Upload Release Asset
136+
uses: actions/upload-release-asset@v1
137+
env:
138+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
139+
with:
140+
upload_url: ${{ steps.create_release.outputs.upload_url }}
141+
asset_path: juno-node-${{ steps.version_check.outputs.rawVersion }}.tgz
142+
asset_name: juno-node-${{ steps.version_check.outputs.releaseVersion }}.tgz
143+
asset_content_type: application/gzip
144+
145+
- name: Publish to npm
146+
run: npm publish juno-node-${{ steps.version_check.outputs.rawVersion }}.tgz --tag beta
147+
env:
148+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.github/workflows/pr.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- master
5+
- staging
6+
- develop
7+
8+
name: Continuous integration (PR)
9+
10+
jobs:
11+
version-check:
12+
if: github.base_ref == 'staging' || github.base_ref == 'master'
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- run: git fetch --all --tags
17+
18+
- name: Check Release Version (staging)
19+
if: github.base_ref == 'staging'
20+
uses: thebongy/version-check@v1
21+
with:
22+
file: package.json
23+
tagFormat: v${version}-beta
24+
id: version_check_staging
25+
26+
- name: Check Release Version (master)
27+
if: github.base_ref == 'master'
28+
uses: thebongy/version-check@v1
29+
with:
30+
file: package.json
31+
tagFormat: v${version}
32+
id: version_check_master
33+
build:
34+
runs-on: ubuntu-latest
35+
steps:
36+
- uses: actions/checkout@v2
37+
- run: git fetch --all --tags
38+
39+
- name: Check Release Version
40+
uses: thebongy/version-check@v1
41+
with:
42+
file: package.json
43+
id: version_check
44+
45+
- name: Setup nodejs
46+
uses: actions/setup-node@v1
47+
with:
48+
node-version: '12.x'
49+
50+
- name: Install dependencies
51+
run: npm ci
52+
53+
- name: Linting and tests
54+
run: npm run test:prod
55+
56+
- name: Build
57+
run: npm build
58+
59+
- name: Create tar
60+
run: npm pack
61+
62+
- name: Upload Artifact
63+
uses: actions/upload-artifact@v2
64+
with:
65+
name: juno-node@v${{ steps.version_check.outputs.releaseVersion }}-alpha
66+
path: ./juno-node-${{ steps.version_check.outputs.releaseVersion }}.tgz

.travis.yml.sample

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)