Skip to content

Commit

Permalink
Build snapshot/release in runner instead of in container
Browse files Browse the repository at this point in the history
When I inspected the natives of a build from my branch and compared it to master, I noticed that while the master output-libs artifact only had one jar file in it (jamepad-2.30.0.0-SNAPSHOT-natives-desktop.jar) mine had 4 files in them (jamepad-2.30.0.0-SNAPSHOT.jar alongside other files with "workspace" at the start instead of jamepad for some reason, including the one with natives-desktop at the end). I figure this is because the build was being done before the deploy. As for the workspace name, it may be to do with how the container is configured...
  • Loading branch information
SonicGDX committed Dec 3, 2024
1 parent 02e82bf commit 768cf30
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
3 changes: 0 additions & 3 deletions .github/actions/docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,5 @@ chmod +x gradlew
# Build with Gradle
./gradlew jnigen jnigenBuild jnigenJarNativesDesktop --no-daemon

# Build Snapshot
./gradlew build --no-daemon

# clean up gradle files before handing back to runner
rm -rf .gradle
6 changes: 3 additions & 3 deletions .github/workflows/pushaction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
name: macos-natives
path: libs

# Build natives and snapshot in docker container
# Build natives in docker container
- name: Build in Docker Container
uses: ./.github/actions/docker
id: docker
Expand All @@ -91,10 +91,10 @@ jobs:
uses: gradle/[email protected]

# Snapshot was built inside docker container
- name: Snapshot deploy
- name: Snapshot build deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository_owner == 'libgdx'
env:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run:
./gradlew publish --no-daemon
./gradlew build publish --no-daemon
4 changes: 2 additions & 2 deletions .github/workflows/releaseaction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
name: macos-natives
path: libs

# Build natives and snapshot in docker container
# Build natives in docker container
- name: Build in Docker Container
uses: ./.github/actions/docker
id: docker
Expand Down Expand Up @@ -102,4 +102,4 @@ jobs:
NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
run:
./gradlew publish -PRELEASE -Psigning.gnupg.keyId=${{ secrets.GPG_KEYID }} -Psigning.gnupg.passphrase=${{ secrets.GPG_PASSPHRASE }} -Psigning.gnupg.keyName=${{ secrets.GPG_KEYID }} --no-daemon
./gradlew build publish -PRELEASE -Psigning.gnupg.keyId=${{ secrets.GPG_KEYID }} -Psigning.gnupg.passphrase=${{ secrets.GPG_PASSPHRASE }} -Psigning.gnupg.keyName=${{ secrets.GPG_KEYID }} --no-daemon

0 comments on commit 768cf30

Please sign in to comment.