-
Notifications
You must be signed in to change notification settings - Fork 2
65 lines (54 loc) · 1.68 KB
/
staging.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
name: Staging
on:
repository_dispatch:
types: ["dispatch-staging"]
workflow_dispatch:
jobs:
deploy:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node.js 12
uses: actions/setup-node@v2
with:
node-version: '12'
# Download .war from GitHub workflow artifact
- name: Download WAR binary from GitHub artifact
uses: dawidd6/action-download-artifact@v2
with:
workflow: staging.yml
branch: staging
repo: keeps/dbptk-ui
# Rename and moves the WAR
- name: Prepare WAR
run: |
mkdir -p resources/war
mv artifact/dbvtk-staging.war resources/war/dbvtk.war
- name: Package
run: yarn --link-duplicates --pure-lockfile && yarn dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RUNNER_OS: ${{ runner.os }}
- name: Install Snapcraft
if: startsWith(matrix.os, 'ubuntu')
uses: samuelmeuli/action-snapcraft@v1
with:
snapcraft_token: ${{ secrets.SNAP_TOKEN_EDGE }}
- name: Upload to snapcraft
if: startsWith(matrix.os, 'ubuntu')
run: snapcraft upload --release=edge dist/dbptk-desktop*.snap
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: artifact
path: |
dist/*
!dist/linux-unpacked/*
!dist/win-unpacked/*
!dist/win-ia32-unpacked/*
!dist/mac/*
retention-days: 1