-
Notifications
You must be signed in to change notification settings - Fork 45
51 lines (48 loc) · 1.57 KB
/
cd.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
name: Continuous Delivery
# Trigger the workflow on push only
# Secrets are only available on the repository on which they are declared
on:
push:
branches:
- master
jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Package with Gradle (no test)
run: |
./gradlew --stacktrace --info packageApp -x test
- name: Generate Windows Installer with InnoSetup
run: |
chmod 777 build/distributions
chmod -R 777 build/jre
./gradlew --stacktrace --info generateWindowsInstallerInDocker
- name: Save Package Job Artifacts
uses: actions/upload-artifact@v1
with:
name: package-artifacts
path: build/distributions/
deploy:
needs: package
runs-on: ubuntu-latest
steps:
- name: Get Package Job Artifacts
uses: actions/download-artifact@v1
with:
name: package-artifacts
- name: Upload to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read
env:
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: 'eu-west-3' # optional: defaults to us-east-1
SOURCE_DIR: 'package-artifacts' # optional: defaults to entire repository
DEST_DIR: 'snapshots'