-
Notifications
You must be signed in to change notification settings - Fork 15
76 lines (62 loc) · 2.27 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: biocollect build
on:
push:
branches:
- develop
- master
- feature/**
- hotfix/**
env:
TZ: Australia/Canberra
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
- name: Install nodejs
uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install
- name: Read the biocollect version from the gradle.properties file
id: read_property
uses: christian-draeger/[email protected]
with:
path: './gradle.properties'
properties: 'biocollectVersion'
- name: Get the package id for the version read from the properties file
uses: castlabs/[email protected]
id: versions
with:
version: ${{steps.read_property.outputs.biocollectVersion}}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Delete the github package with the id we just retrieved (all SNAPSHOT versions are considered part of the same package)
uses: actions/delete-package-versions@v2
if: ${{ steps.versions.outputs.ids != '' }}
with:
package-version-ids: "${{ steps.versions.outputs.ids }}"
token: ${{ secrets.GITHUB_TOKEN }}
- name: build biocollect before running js unit test to compile dependent js templates
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
with:
arguments: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run javascript unit tests
run: node_modules/karma/bin/karma start karma.conf.js --single-run --browsers ChromeHeadless
- name: Clean to remove clover instrumentation
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
with:
arguments: clean
- name: Publish the JAR to the repository
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
with:
arguments: publish
env:
TRAVIS_DEPLOY_USERNAME: ${{secrets.DEPLOY_USERNAME}}
TRAVIS_DEPLOY_PASSWORD: ${{secrets.DEPLOY_PASSWORD}}