Skip to content

Commit 10ea921

Browse files
committed
Update GitHub Actions workflows
1 parent 3f4d474 commit 10ea921

File tree

3 files changed

+55
-33
lines changed

3 files changed

+55
-33
lines changed

.github/workflows/publish.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
concurrency: publish-${{ github.ref }}
8+
9+
jobs:
10+
tests:
11+
uses: ./.github/workflows/tests.yml
12+
13+
publish:
14+
name: Publish
15+
16+
needs: [tests]
17+
18+
runs-on: ubuntu-24.04
19+
20+
permissions:
21+
packages: write
22+
23+
steps:
24+
- uses: actions/checkout@v4
25+
- name: Set up Java
26+
uses: actions/setup-java@v4
27+
with:
28+
java-version: '23'
29+
distribution: 'corretto'
30+
- name: Set up Maven GitHub Packages credentials
31+
run: |
32+
mkdir -p ~/.m2
33+
echo "<settings><servers><server><id>github-packages</id><username>${GITHUB_ACTOR}</username><password>${GITHUB_TOKEN}</password></server></servers></settings>" > ~/.m2/settings.xml
34+
env:
35+
GITHUB_ACTOR: ${{ github.actor }}
36+
GITHUB_TOKEN: ${{ github.token }}
37+
- name: Deploy with Maven
38+
run: mvn deploy

.github/workflows/tests-windows.yml

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

.github/workflows/tests.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
1-
name: Java CI
1+
name: Tests
22

3-
on: [push, pull_request]
3+
on:
4+
pull_request:
5+
workflow_call:
46

57
jobs:
6-
build:
7-
runs-on: ubuntu-latest
8-
8+
tests:
9+
name: Run tests
10+
runs-on: ubuntu-24.04
911
steps:
10-
- uses: actions/checkout@v3
11-
- name: Set up JDK 11
12-
uses: actions/setup-java@v3
12+
# https://github.com/actions/checkout/issues/135#issuecomment-602171132
13+
- name: Set git to use LF
14+
run: |
15+
git config --global core.autocrlf false
16+
git config --global core.eol lf
17+
- uses: actions/checkout@v4
18+
- name: Set up Java
19+
uses: actions/setup-java@v4
1320
with:
14-
java-version: '11'
15-
distribution: 'adopt'
21+
java-version: '23'
22+
distribution: 'corretto'
1623
cache: maven
1724
- name: Build with Maven
1825
run: mvn --batch-mode test

0 commit comments

Comments
 (0)