Skip to content

Commit

Permalink
add deployment for maven snapshot testing
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom-Ski committed Jul 7, 2024
1 parent 1795dae commit 0458298
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/msvc-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build and deploy

on:
push:
branches: [ msvc-support ]
release:
types: [ published ]

env:
GRADLE_USER_HOME: .gradle

jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
- name: Upload all output libs
uses: actions/[email protected]
with:
name: output-libs
path: "*/build/libs"

- name: Snapshot build deploy
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository_owner == 'libgdx'
run: ./gradlew build publish
env:
ORG_GRADLE_PROJECT_NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}

- name: Import GPG key
if: github.event_name == 'release' && github.repository_owner == 'libgdx'
id: import_gpg
uses: crazy-max/ghaction-import-gpg@1c6a9e9d3594f2d743f1b1dd7669ab0dfdffa922
with:
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
- name: Release build deploy
if: github.event_name == 'release' && github.repository_owner == 'libgdx'
run: ./gradlew build publish -PRELEASE -Psigning.gnupg.keyId=${{ secrets.GPG_KEYID }} -Psigning.gnupg.passphrase=${{ secrets.GPG_PASSPHRASE }} -Psigning.gnupg.keyName=${{ secrets.GPG_KEYID }}
env:
ORG_GRADLE_PROJECT_NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }}
ORG_GRADLE_PROJECT_NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
2 changes: 2 additions & 0 deletions gdx-jnigen-gradle/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@

plugins {
id 'java-gradle-plugin'
}
archivesBaseName = "gdx-jnigen-gradle-msvc-experiment"

dependencies {
implementation project(":gdx-jnigen")
Expand Down
2 changes: 2 additions & 0 deletions gdx-jnigen-loader/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
archivesBaseName = "gdx-jnigen-loader-msvc-experiment"

sourceCompatibility = 1.7
targetCompatibility = 1.7

Expand Down
2 changes: 2 additions & 0 deletions gdx-jnigen/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
archivesBaseName = "gdx-jnigen-msvc-experiment"

dependencies {
implementation "com.github.javaparser:javaparser-core:3.14.14"
api project(":gdx-jnigen-loader")
Expand Down
1 change: 1 addition & 0 deletions publish.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ subprojects
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = project.archivesBaseName
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
Expand Down

0 comments on commit 0458298

Please sign in to comment.