-
Notifications
You must be signed in to change notification settings - Fork 27
61 lines (60 loc) · 2.05 KB
/
Copy pathcreate-release.yaml
File metadata and controls
61 lines (60 loc) · 2.05 KB
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
name: Create Release
on:
push:
tags:
- '**'
pull_request:
# Release a new SNAPSHOT version every time a PR is merged to v6.
types: [closed]
branches: ['v6']
jobs:
release:
name: Deploy
if: >
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags'))
|| (github.event_name == 'pull_request' && github.event.pull_request.merged == true)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Unpack secrets
env:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
./tools/decrypt_secret.sh
- name: Deploy
env:
OKTA_DUMMY_CI_PW: ${{ secrets.OKTA_DUMMY_CI_PW }}
WCS_DUMMY_CI_PW: ${{ secrets.WCS_DUMMY_CI_PW }}
OKTA_CLIENT_SECRET: ${{ secrets.OKTA_CLIENT_SECRET }}
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
run: |
export GPG_TTY=$(tty)
source ./passphrase.env # load $MAVEN_GPG_PASSHRASE for maven-gpg-plugin
mvn -DskipTests clean package
mvn -s settings.xml \
-Dcentral-publishing.autoPublish=true \
-Dcentral-publishing.waitUntil=published \
deploy
- name: Archive artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: jar-files
path: "target/*.jar"
retention-days: 1
gh-release:
name: Create a GitHub Release
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs: [ release ]
steps:
- name: Download artifacts to append to release
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: jar-files
path: target
- name: Create a GitHub Release
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1
with:
generate_release_notes: true
draft: true
files: target/*.jar