Skip to content

Commit

Permalink
ci: add snapshot release support
Browse files Browse the repository at this point in the history
  • Loading branch information
sylv256 committed Nov 3, 2024
1 parent 9604ceb commit 1543a20
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/snapshot-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Release
on: [workflow_dispatch] # Manual trigger
jobs:
build:
runs-on: ubuntu-22.04
container:
image: eclipse-temurin:21-jdk
options: --user root
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: gradle/wrapper-validation-action@v1
- run: chmod +x ./gradlew
- run: ./gradlew checkVersion build publish --stacktrace
env:
SNAPSHOTS_MAVEN_URL: ${{ secrets.SNAPSHOTS_MAVEN_URL }}
SNAPSHOTS_MAVEN_USERNAME: ${{ secrets.SNAPSHOTS_MAVEN_USERNAME }}
SNAPSHOTS_MAVEN_PASSWORD: ${{ secrets.SNAPSHOTS_MAVEN_PASSWORD }}
11 changes: 10 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ plugins {
id 'com.github.johnrengelman.shadow' version '8.1.1'
}

version = '0.10.4'
version = '0.10.5-SNAPSHOT'

def ENV = System.getenv()
version = version + (ENV.GITHUB_ACTIONS ? "" : "+local")
Expand Down Expand Up @@ -98,6 +98,15 @@ publishing {
}
}
}
if (ENV.SNAPSHOTS_MAVEN_URL) {
maven {
url ENV.SNAPSHOTS_MAVEN_URL
credentials {
username ENV.SNAPSHOTS_MAVEN_USERNAME
password ENV.SNAPSHOTS_MAVEN_PASSWORD
}
}
}
}
}

Expand Down

0 comments on commit 1543a20

Please sign in to comment.