FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
defectdojo-client-java/.github/workflows/release.yml at main · secureCodeBox/defectdojo-client-java · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
secureCodeBox
/
defectdojo-client-java
Public
Notifications
You must be signed in to change notification settings
Fork
13
Star
9
Code
Issues
5
Pull requests
1
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
defectdojo-client-java
/
.github
/
workflows
/
release.yml
Copy path
View runs
More file actions
More file actions
Latest commit
History
History
History
105 lines (92 loc) · 4.08 KB
Breadcrumbs
defectdojo-client-java
/
.github
/
workflows
/
release.yml
Copy path
File metadata and controls
105 lines (92 loc) · 4.08 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#
SPDX-FileCopyrightText: 2023 iteratec GmbH
#
#
SPDX-License-Identifier: Apache-2.0
#
This workflow will publish a Java project with Maven
#
For Maven Release plugin see: https://maven.apache.org/maven-release/maven-release-plugin/
#
For GitHub release see: https://github.com/marketplace/actions/gh-release
name
:
Publish Release
#
If input is empty we automatically bump the version
on
:
workflow_dispatch
:
inputs
:
customversion
:
description
:
'
Custom version, e.g., 1.0.0-beta (optional)
'
required
:
false
default
:
'
'
nextversion
:
description
:
'
Next development version, e.g., 1.0.0-SNAPSHOT (optional)
'
required
:
false
default
:
'
'
jobs
:
publish-release
:
runs-on
:
ubuntu-24.04
if
:
github.repository == 'secureCodeBox/defectdojo-client-java'
permissions
:
contents
:
write
#
needed for release creation
steps
:
-
name
:
Validate next version input
#
Exit when version has no -SNAPSHOT suffix
if
:
github.event.inputs.nextversion != ''
run
:
|
if [[ "${{ inputs.nextversion }}" != *-SNAPSHOT ]]; then exit 1; fi
-
name
:
Releasing custom version
if
:
github.event.inputs.customversion != ''
run
:
echo "Releasing version ${{ github.event.inputs.customversion }}"
-
name
:
Checkout repository
uses
:
actions/checkout@v4
with
:
fetch-depth
:
0
#
required by previous_tag
ref
:
${{ github.head_ref }}
token
:
${{ secrets.SCB_BOT_USER_TOKEN }}
-
name
:
Set up JDK 17
uses
:
actions/setup-java@v4
with
:
java-version
:
17
distribution
:
temurin
server-id
:
central
server-username
:
MAVEN_USERNAME
server-password
:
MAVEN_PASSWORD
gpg-private-key
:
${{ secrets.SIGNING_KEY }}
gpg-passphrase
:
MAVEN_GPG_PASSPHRASE
-
name
:
Import GPG key
uses
:
crazy-max/ghaction-import-gpg@v6
with
:
gpg_private_key
:
${{ secrets.SCB_BOT_GPG_KEY }}
passphrase
:
${{ secrets.SCB_BOT_GPG_PASSPHRASE }}
git_user_signingkey
:
true
git_tag_gpgsign
:
true
git_commit_gpgsign
:
true
git_committer_name
:
secureCodeBoxBot
git_committer_email
:
securecodebox@iteratec.com
#
CASE: Version set
-
name
:
"
[Custom version] Release & Publish
"
if
:
github.event.inputs.customversion != ''
#
input "customversion" not empty
run
:
mvn -B release:prepare release:perform -DreleaseVersion=${{ github.event.inputs.customversion }} -DdevelopmentVersion=${{ github.event.inputs.nextversion }} -P release
env
:
GITHUB_TOKEN
:
${{ secrets.SCB_BOT_USER_TOKEN }}
MAVEN_USERNAME
:
${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD
:
${{ secrets.MAVEN_PASSWORD }}
MAVEN_GPG_PASSPHRASE
:
${{ secrets.SIGNING_PASSWORD }}
#
CASE: NO Version set
-
name
:
"
[Auto version] Release & Publish
"
if
:
github.event.inputs.customversion == ''
#
input "customversion" empty
run
:
mvn -B release:prepare release:perform -DdevelopmentVersion=${{ github.event.inputs.nextversion }} -P release
env
:
GITHUB_TOKEN
:
${{ secrets.SCB_BOT_USER_TOKEN }}
MAVEN_USERNAME
:
${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD
:
${{ secrets.MAVEN_PASSWORD }}
MAVEN_GPG_PASSPHRASE
:
${{ secrets.SIGNING_PASSWORD }}
-
name
:
"
Extract maven version
"
#
required for following change readme step
id
:
extract-version
run
:
|
MVN_VERSION=$(mvn -q -Dexec.executable=echo -Dexec.args='${project.version}' --non-recursive exec:exec)
echo "MVN_VERSION=$MVN_VERSION" >> $GITHUB_OUTPUT
#
Required for creation of GitHub release
-
name
:
"
Get previous tag
"
id
:
previous_tag
uses
:
WyriHaximus/github-action-get-previous-tag@v1
-
name
:
"
Create GitHub Release
"
uses
:
softprops/action-gh-release@v1
with
:
token
:
${{ github.token }}
#
could be replaced with personal access token
tag_name
:
${{ steps.previous_tag.outputs.tag }}
generate_release_notes
:
true
Back
|
FazBrowse Home
|
New Git URL