File tree 2 files changed +54
-0
lines changed
2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Publish to GitHub Packages
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ permissions :
9
+ packages : write
10
+ contents : read
11
+
12
+ jobs :
13
+ build :
14
+ runs-on : ubuntu-latest
15
+
16
+ steps :
17
+ - name : Checkout Repository
18
+ uses : actions/checkout@v4
19
+
20
+ - name : Set up JDK 8
21
+ uses : actions/setup-java@v3
22
+ with :
23
+ distribution : ' temurin'
24
+ java-version : ' 8'
25
+ server-id : github
26
+ settings-path : ${{ github.workspace }}
27
+
28
+ - name : Create Maven settings.xml
29
+ run : |
30
+ mkdir -p ~/.m2
31
+ echo '<settings>
32
+ <servers>
33
+ <server>
34
+ <id>github</id>
35
+ <username>${{ github.actor }}</username>
36
+ <password>${{ secrets.GITHUB_TOKEN }}</password>
37
+ </server>
38
+ </servers>
39
+ </settings>' > ~/.m2/settings.xml
40
+
41
+ - name : Build with Maven
42
+ run : mvn clean package
43
+
44
+ - name : Publish to GitHub Packages
45
+ run : mvn deploy -DskipTests --settings ~/.m2/settings.xml
46
+ env :
47
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 106
106
</plugins >
107
107
</build >
108
108
109
+ <distributionManagement >
110
+ <repository >
111
+ <id >github</id >
112
+ <url >https://maven.pkg.github.com/payment-components/rest-sdk-wrapper</url >
113
+ </repository >
114
+ </distributionManagement >
115
+
109
116
</project >
You can’t perform that action at this time.
0 commit comments