Skip to content

Commit 77fa181

Browse files
authored
added deploy (DozerMapper#849)
1 parent 97ebbb7 commit 77fa181

File tree

9 files changed

+51
-99
lines changed

9 files changed

+51
-99
lines changed

.travis/deploy-settings.xml renamed to .github/deploy-settings.xml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
<username>${env.SONATYPE_USERNAME}</username>
2323
<password>${env.SONATYPE_PASSWORD}</password>
2424
</server>
25+
<server>
26+
<id>github</id>
27+
<username>github</username>
28+
<password>${env.GITHUB_TOKEN}</password>
29+
</server>
2530
</servers>
2631
<profiles>
2732
<profile>
@@ -31,7 +36,7 @@
3136
</activation>
3237
<properties>
3338
<gpg.executable>gpg</gpg.executable>
34-
<gpg.keyname>${env.GPG_KEY_NAME}</gpg.keyname>
39+
<gpg.keyname>DozerMapper</gpg.keyname>
3540
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
3641
</properties>
3742
</profile>

.github/workflows/build.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
fail-fast: false
2121
matrix:
22-
language: [ 'java' ]
22+
java_version: [ "11" ]
2323

2424
steps:
2525
- name: Checkout repository
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/setup-java@v3
2929
with:
3030
distribution: "temurin"
31-
java-version: "8"
31+
java-version: ${{matrix.java_version}}
3232

3333
- uses: actions/cache@v3
3434
with:
@@ -40,18 +40,15 @@ jobs:
4040
- name: Build project with Maven
4141
run: mvn -B clean install
4242

43-
# Initializes the CodeQL tools for scanning.
4443
- name: Initialize CodeQL
4544
uses: github/codeql-action/init@v2
4645
with:
47-
languages: ${{ matrix.language }}
46+
languages: java
4847

49-
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
50-
# If this step fails, then you should remove it and run the build manually (see below)
5148
- name: Autobuild
5249
uses: github/codeql-action/autobuild@v2
5350

5451
- name: Perform CodeQL Analysis
5552
uses: github/codeql-action/analyze@v2
5653
with:
57-
category: "/language:${{matrix.language}}"
54+
category: "/language:java"

.github/workflows/release.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Publish package to GitHub Packages
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
publish:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
packages: write
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- uses: actions/setup-java@v3
17+
with:
18+
distribution: "temurin"
19+
java-version: "11"
20+
21+
- name: Publish package
22+
run: mvn -B -Prelease-github deploy -DskipTests --settings .github/deploy-settings.xml
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,5 @@ release.properties
2222
# OS X #
2323
########
2424
.DS_Store
25+
26+
depoy-ossrh.sh

.travis.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.travis/codesigning.asc.enc

-5.36 KB
Binary file not shown.

.travis/deploy-codesigning.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

.travis/deploy.sh

Lines changed: 0 additions & 22 deletions
This file was deleted.

pom.xml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,21 @@
286286
</snapshotRepository>
287287
</distributionManagement>
288288
</profile>
289+
<profile>
290+
<id>release-github</id>
291+
<distributionManagement>
292+
<snapshotRepository>
293+
<id>github</id>
294+
<name>GitHub Packages</name>
295+
<url>https://maven.pkg.github.com/DozerMapper/dozer</url>
296+
</snapshotRepository>
297+
<repository>
298+
<id>github</id>
299+
<name>GitHub Packages</name>
300+
<url>https://maven.pkg.github.com/DozerMapper/dozer</url>
301+
</repository>
302+
</distributionManagement>
303+
</profile>
289304
</profiles>
290305

291306
<developers>

0 commit comments

Comments
 (0)