generated from phpvms/acars-pdk
-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (59 loc) · 1.63 KB
/
distribute.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
name: 'Build'
on:
pull_request:
push:
branches:
- main
jobs:
artifacts:
name: 'Create release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: install node
uses: actions/setup-node@v3
with:
cache: 'npm'
- name: build
run: |
npm install
npm run build
# Create a zip from what's in this repo
- name: Archive Release
uses: thedoctor0/[email protected]
with:
type: 'zip'
directory: './dist'
path: '.'
filename: '../stable.zip'
exclusions: ''
# List all the files that have been created
- name: 'List files'
run: |
find dist/ -maxdepth 2 -type f
- name: Upload artifact for deployment job
uses: actions/upload-artifact@v3
with:
name: acars-package
path: 'stable.zip'
#
# Now publish it up
#
publish:
runs-on: ubuntu-latest
needs: [ 'artifacts' ]
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || startsWith(github.ref, 'refs/tags/')
steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
with:
name: acars-package
- uses: BetaHuhn/do-spaces-action@latest
with:
access_key: ${{ secrets.SPACE_ACCESS_KEY}}
secret_key: ${{ secrets.SPACE_SECRET_KEY }}
space_name: ${{ secrets.SPACE_NAME }}
space_region: ${{ secrets.SPACE_REGION }}
cdn_domain: ${{ secrets.SPACE_CDN_DOMAIN }}
source: stable.zip
out_dir: scripts