Skip to content

Commit 8e4ad5a

Browse files
committed
Add separate create release github action
1 parent cdc6186 commit 8e4ad5a

File tree

2 files changed

+47
-24
lines changed

2 files changed

+47
-24
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Create Release
2+
on:
3+
push:
4+
# run only on tags
5+
tags:
6+
- '**'
7+
8+
jobs:
9+
release:
10+
name: Deploy
11+
if: startsWith(github.ref, 'refs/tags')
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: Unpack secrets
16+
env:
17+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
18+
run: |
19+
./decrypt_secret.sh
20+
- name: Deploy
21+
env:
22+
OKTA_DUMMY_CI_PW: ${{ secrets.OKTA_DUMMY_CI_PW }}
23+
WCS_DUMMY_CI_PW: ${{ secrets.WCS_DUMMY_CI_PW }}
24+
OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }}
25+
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
26+
run: |
27+
mvn -DskipTests clean package
28+
mvn -s settings.xml deploy
29+
gh-release:
30+
name: Create a GitHub Release
31+
if: startsWith(github.ref, 'refs/tags')
32+
runs-on: ubuntu-latest
33+
needs: [ release ]
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v3
37+
- name: Download build artifact to append to release
38+
uses: actions/download-artifact@v3
39+
with:
40+
path: "target/*.jar"
41+
- name: Release
42+
uses: softprops/action-gh-release@v1
43+
with:
44+
generate_release_notes: true
45+
draft: true
46+
files: target/*.jar

.github/workflows/test.yaml

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1+
name: Tests
12
on:
23
push:
34
branches:
45
- main
5-
tags:
6-
- '**'
76
pull_request:
87

9-
108
jobs:
119
tests:
1210
name: Tests
@@ -31,24 +29,3 @@ jobs:
3129
run: |
3230
docker-compose -f src/test/resources/docker-compose-test.yaml pull
3331
mvn clean test
34-
deploy:
35-
needs: tests
36-
name: Deploy
37-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
38-
runs-on: ubuntu-latest
39-
steps:
40-
- uses: actions/checkout@v3
41-
- name: Unpack secrets
42-
env:
43-
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
44-
run: |
45-
./decrypt_secret.sh
46-
- name: Deploy
47-
env:
48-
OKTA_DUMMY_CI_PW: ${{ secrets.OKTA_DUMMY_CI_PW }}
49-
WCS_DUMMY_CI_PW: ${{ secrets.WCS_DUMMY_CI_PW }}
50-
OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }}
51-
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
52-
run: |
53-
mvn -DskipTests clean package
54-
mvn -s settings.xml deploy

0 commit comments

Comments
 (0)