Skip to content

Commit 1b0d146

Browse files
committed
Adds GitHub Packages publish workflow
1 parent 3fcf8ec commit 1b0d146

File tree

3 files changed

+46
-11
lines changed

3 files changed

+46
-11
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish package to GitHub Packages
2+
3+
on:
4+
release:
5+
types: [created]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: read
13+
packages: write
14+
15+
steps:
16+
- uses: actions/checkout@v3
17+
- name: Set up JDK 8
18+
uses: actions/setup-java@v3
19+
with:
20+
java-version: '8'
21+
distribution: 'temurin'
22+
server-id: github
23+
settings-path: ${{ github.workspace }}
24+
25+
- name: Build with Maven
26+
run: mvn -B package --file pom.xml
27+
28+
- name: Publish to GitHub Packages Apache Maven
29+
run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml
30+
env:
31+
GITHUB_TOKEN: ${{ github.token }}

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ build.xml
44
manifest.mf
55
_ids_test.txt
66
/.idea/
7-
/*.iml
7+
/*.iml
8+
/target/

pom.xml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,23 @@
44
<groupId>pl.smsapi</groupId>
55
<artifactId>smsapi-lib</artifactId>
66
<packaging>jar</packaging>
7-
<version>2.5</version>
7+
<version>3.0.0-SNAPSHOT</version>
88
<name>smsapi-lib</name>
99
<url>http://www.smsapi.pl/</url>
1010
<description>SMSAPI client library</description>
1111

12+
<distributionManagement>
13+
<repository>
14+
<id>github</id>
15+
<name>GitHub Packages</name>
16+
<url>https://maven.pkg.github.com/smsapi/smsapi-java-client</url>
17+
</repository>
18+
</distributionManagement>
19+
1220
<scm>
13-
<url>https://github.com/smsapi/smsapi-java-client</url>
14-
<connection>https://github.com/smsapi/smsapi-java-client</connection>
21+
<url>https://github.com/smsapi/smsapi-java-client.git</url>
22+
<connection>scm:git:ssh://git@github.com/smsapi/smsapi-java-client.git</connection>
23+
<developerConnection>scm:git:ssh://git@github.com/smsapi/smsapi-java-client.git</developerConnection>
1524
</scm>
1625

1726
<licenses>
@@ -30,6 +39,7 @@
3039
</developers>
3140

3241
<properties>
42+
<maven.compiler.release>8</maven.compiler.release>
3343
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3444
<project.dist.directory>${project.basedir}/dist/${project.version}/</project.dist.directory>
3545
</properties>
@@ -63,13 +73,6 @@
6373

6474
<build>
6575
<plugins>
66-
<plugin>
67-
<artifactId>maven-compiler-plugin</artifactId>
68-
<configuration>
69-
<source>1.6</source>
70-
<target>1.6</target>
71-
</configuration>
72-
</plugin>
7376

7477
<plugin>
7578
<groupId>org.apache.maven.plugins</groupId>

0 commit comments

Comments
 (0)