-
Notifications
You must be signed in to change notification settings - Fork 9
82 lines (74 loc) · 2.17 KB
/
release.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
77
78
79
80
81
82
name: Release
on:
push:
tags:
- "**"
branches-ignore:
- "**"
jobs:
build:
runs-on: ubuntu-latest
env:
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version"
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'adopt'
- name: Cache
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Run Tests
run: mvn $MAVEN_CLI_OPTS -Dtestng.groups="travis-ci" test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy:
needs: build
runs-on: ubuntu-latest
env:
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version"
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
java-version: 8
distribution: 'adopt'
- name: Cache
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Deploy to GitHub packages
run: mvn $MAVEN_CLI_OPTS clean deploy -Dmaven.test.skip=true -Pdefault
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
dispatch:
needs: [build, deploy]
strategy:
matrix:
repo: [ 'keeps/dbptk-desktop', 'keeps/dbptk-enterprise' ]
runs-on: ubuntu-latest
steps:
- name: Get release version
id: tag
run: echo ::set-output name=result::${GITHUB_REF/refs\/tags\/v/}
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
repository: ${{ matrix.repo }}
event-type: dispatch-main
client-payload: '{"version": "${{ steps.tag.outputs.result }}", "flow": "main"}'