-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (57 loc) · 2.07 KB
/
main.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
name: Tour Plugin - CI
on:
push:
jobs:
build:
runs-on: ubuntu-latest
env:
DATASHARE_VERSION: '17.0.4'
DATASHARE_PACKAGE: 'datashare-17.0.4.deb'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.19.1'
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Download Datashare for Debian
run: wget "https://github.com/ICIJ/datashare-installer/releases/download/${{ env.DATASHARE_VERSION }}/${{ env.DATASHARE_PACKAGE }}"
- name: Install Datashare
run: sudo apt install -y ./${{ env.DATASHARE_PACKAGE }}
- name: Run Datashare in background
run: mkdir -p tmp && yarn run test:datashare &
- name: Run all tests
run: yarn test
release:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/v')
env:
DATASHARE_VERSION: '16.0.3'
DATASHARE_PACKAGE: 'datashare-16.0.3.deb'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.19.1'
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Make distribution
run: yarn build
- name: Create release assets
run: |
mkdir datashare-plugin-tour-${{ github.ref_name }}
cp package.json datashare-plugin-tour-${{ github.ref_name }}
cp -R dist datashare-plugin-tour-${{ github.ref_name }}
tar czf datashare-plugin-tour-${{ github.ref_name }}.tgz datashare-plugin-tour-${{ github.ref_name }}
zip -r datashare-plugin-tour-${{ github.ref_name }}.zip datashare-plugin-tour-${{ github.ref_name }}
- name: Upload release assets
uses: softprops/action-gh-release@v2
with:
files: |
datashare-plugin-tour-${{ github.ref_name }}.tgz
datashare-plugin-tour-${{ github.ref_name }}.zip