Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 26 additions & 1 deletion .github/workflows/build-all-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ name: Build and publish for all platforms
on:
release:
types: [published]
workflow_dispatch:
inputs:
publish:
description: 'Publish to Maven Central?'
required: false
default: false
type: boolean

jobs:
linux:
Expand Down Expand Up @@ -211,8 +218,11 @@ jobs:
with:
distribution: zulu
java-version: '7'

# with central credentials
- name: Setup Temurin JDK 21
uses: actions/setup-java@v5
if: github.event_name == 'release' || inputs.publish
with:
distribution: temurin
java-version: '21'
Expand All @@ -222,6 +232,14 @@ jobs:
server-id: 'central'
server-username: CENTRAL_TOKEN_USERNAME
server-password: CENTRAL_TOKEN_PASSWORD
# without central credentials
- name: Setup Temurin JDK 21
uses: actions/setup-java@v5
if: github.event_name != 'release' && !inputs.publish
with:
distribution: temurin
java-version: '21'
cache: maven

- name: Download natives
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -261,13 +279,20 @@ jobs:
echo "Contents of src/resources/net:"
find src/resources/net -maxdepth 3 -type f -print

- name: Build with Maven (verify) consuming staged natives
# with maven central
- name: Build and deploy with Maven
run: ./mvnw -B -V -Pdeploy deploy
if: github.event_name == 'release' || inputs.publish
env:
CENTRAL_TOKEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
CENTRAL_TOKEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}

# without maven central
- name: Build with Maven
run: ./mvnw -B -V verify
if: github.event_name != 'release' && !inputs.publish

- name: Upload final JAR
uses: actions/upload-artifact@v4
with:
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Run tests

on:
push:
pull_request:
Comment on lines 3 to -5
Copy link

@Marcono1234 Marcono1234 Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this change here intentional, that for PRs tests will not be executed anymore?

Edit: Have created #17 to revert this.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this was superfluous because the push trigger also builds the PR. It leads to duplicate builds.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But that is only if you (as maintainer) push changes and create a PR. For external contributors push will not trigger1.

Footnotes

  1. At least not in the context of the PR. The user might have enabled actions for their fork, but that would be explicit opt-in and the outcome of that actions run has no influence and is not visible in the context of the PR.


jobs:
linux:
Expand Down