Skip to content

Commit b79740c

Browse files
committed
Adjust GitHub actions
1 parent 0cd3660 commit b79740c

File tree

4 files changed

+75
-66
lines changed

4 files changed

+75
-66
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and deploy releases to GitHub
2+
3+
on:
4+
push:
5+
branches: ['*']
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: Set up JDK 14
15+
uses: actions/setup-java@v1
16+
with:
17+
java-version: 14
18+
- name: Set up GPG
19+
run: |
20+
echo "$GPG_PRIVATE_KEY" > private.asc
21+
gpg --import --batch private.asc
22+
env:
23+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
24+
- name: Build with Maven
25+
run: mvn -B -Dgpg.passphrase=${GPG_PASSPHRASE} -Dtest=org.purejava.integrations.keychain.KeePassXCAccessTest install --file pom.xml
26+
env:
27+
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
28+
29+
release:
30+
name: Draft a Release on GitHub Releases
31+
runs-on: ubuntu-latest
32+
needs: build
33+
if: startsWith(github.ref, 'refs/tags/')
34+
steps:
35+
- name: Checkout code
36+
uses: actions/checkout@v2
37+
- name: Create GitHub Release
38+
id: create_release
39+
uses: actions/create-release@v1
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
with:
43+
tag_name: ${{ github.ref }}
44+
release_name: ${{ github.ref }}
45+
body: |
46+
:construction: Work in Progress
47+
draft: true
48+
prerelease: false

.github/workflows/publish-github.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Release to Maven central repository
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Check out Git repository
13+
uses: actions/checkout@v2
14+
15+
- name: Install Java and Maven
16+
uses: actions/setup-java@v1
17+
with:
18+
java-version: 14
19+
20+
- name: Release Maven package
21+
uses: samuelmeuli/action-maven-publish@v1
22+
with:
23+
maven_args: -D=skipTests=true
24+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
25+
gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}
26+
nexus_username: ${{ secrets.NEXUS_USERNAME }}
27+
nexus_password: ${{ secrets.NEXUS_PASSWORD }}

0 commit comments

Comments
 (0)