File tree 1 file changed +45
-0
lines changed
1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ # SPDX-FileCopyrightText: 2022 Alliander N.V.
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ name : Release Project
6
+
7
+ on :
8
+ release :
9
+ types : [ released ]
10
+
11
+ jobs :
12
+ publish :
13
+ runs-on : ubuntu-latest
14
+ permissions :
15
+ contents : read
16
+ packages : write
17
+ steps :
18
+ - name : Checkout
19
+ uses : actions/checkout@v4
20
+
21
+ - name : Extract tag name
22
+ id : extract_tagname
23
+ shell : bash
24
+ # Extract the tag name from the git reference, value of GITHUB_REF will be something like refs/tags/<tag_name>.
25
+ run : echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})"
26
+
27
+ - name : Set up JDK 17
28
+ uses : actions/setup-java@v3
29
+ with :
30
+ distribution : ' zulu'
31
+ java-version : ' 17'
32
+
33
+ - name : Create custom Maven Settings.xml
34
+ uses : whelk-io/maven-settings-xml-action@v21
35
+ with :
36
+ output_file : custom_maven_settings.xml
37
+ servers : ' [{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
38
+ - name : Set version with Maven
39
+ run : ./mvnw -B versions:set -DprocessAllModules=true -DnewVersion=${{ steps.extract_tagname.outputs.tagname }}
40
+ env :
41
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
42
+ - name : Deploy with Maven to GitHub Packages
43
+ run : ./mvnw -B -s custom_maven_settings.xml -Prelease clean deploy
44
+ env :
45
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments