Skip to content

Commit cdd38ee

Browse files
committed
add validate and deploy workflows
1 parent 4195ab4 commit cdd38ee

File tree

2 files changed

+58
-20
lines changed

2 files changed

+58
-20
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
name: CI
22
on:
3-
push:
4-
branches: [ master ]
3+
pull_request:
54

65
# Allows you to run this workflow manually from the Actions tab
76
workflow_dispatch:
87

98
jobs:
10-
deploy:
9+
validate:
1110
runs-on: ubuntu-latest
1211
steps:
1312
- uses: actions/checkout@v2
@@ -36,20 +35,4 @@ jobs:
3635
- name: Validate protocol
3736
run: |
3837
cd protocol-validation
39-
npm run validate-protocol ../Development.netcanvas
40-
41-
- name: Tag release
42-
run: git tag $(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)
43-
44-
- name: Get release name
45-
id: getReleaseName
46-
run: echo ::set-output name=RELEASE_NAME::$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)
47-
48-
- name: Release
49-
uses: softprops/action-gh-release@v1
50-
with:
51-
tag_name: ${{ steps.getReleaseName.outputs.RELEASE_NAME }}
52-
name: Release ${{ steps.getReleaseName.outputs.RELEASE_NAME }}
53-
files: Development.netcanvas
54-
env:
55-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
npm run validate-protocol ../Development.netcanvas

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [ master ]
5+
6+
# Allows you to run this workflow manually from the Actions tab
7+
workflow_dispatch:
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
# Set node version
15+
- uses: actions/setup-node@v2
16+
with:
17+
node-version: '12.14.1'
18+
- name: Set NPM 7
19+
run: npm install -g npm@7.6.3
20+
21+
- name: ZIP development protocol
22+
run: zip Development.netcanvas * -r -0
23+
24+
- name: Checkout protocol validation
25+
uses: actions/checkout@v2
26+
with:
27+
repository: complexdatacollective/protocol-validation
28+
path: protocol-validation
29+
30+
- name: Install protocol validation
31+
run: |
32+
cd protocol-validation
33+
git checkout master
34+
npm install
35+
36+
- name: Validate protocol
37+
run: |
38+
cd protocol-validation
39+
npm run validate-protocol ../Development.netcanvas
40+
41+
- name: Tag release
42+
run: git tag $(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)
43+
44+
- name: Get release name
45+
id: getReleaseName
46+
run: echo ::set-output name=RELEASE_NAME::$(date +'%Y%m%d%H%M%S')-$(git log --format=%h -1)
47+
48+
- name: Release
49+
uses: softprops/action-gh-release@v1
50+
with:
51+
tag_name: ${{ steps.getReleaseName.outputs.RELEASE_NAME }}
52+
name: ${{ steps.getReleaseName.outputs.RELEASE_NAME }}
53+
files: Development.netcanvas
54+
env:
55+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)