35 lines
1 KiB
YAML
35 lines
1 KiB
YAML
name: Deploy Snapshot
|
|
on:
|
|
push:
|
|
branches: [ 'main' ]
|
|
paths-ignore:
|
|
- 'license/*'
|
|
- 'readme.md'
|
|
- '.gitignore'
|
|
- '.gitattributes'
|
|
- '.editorconfig'
|
|
|
|
jobs:
|
|
deploy:
|
|
name: Deploy Snapshot
|
|
runs-on: 'ubuntu-latest'
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-java@v3
|
|
with:
|
|
java-version: 17
|
|
distribution: 'temurin'
|
|
- name: Setup Gradle
|
|
uses: gradle/gradle-build-action@v2
|
|
- name: Get project version
|
|
id: get_version
|
|
shell: bash
|
|
run: |
|
|
project_version=$(./gradlew -q --console=plain printVersion --no-daemon)
|
|
echo version=$project_version >> $GITHUB_OUTPUT
|
|
- name: Deploy snapshot version
|
|
if: endsWith(steps.get_version.outputs.version, '-SNAPSHOT')
|
|
run: ./gradlew -Dorg.gradle.parallel=true publish --no-daemon --stacktrace
|
|
env:
|
|
ORG_GRADLE_PROJECT_paperUsername: ${{ secrets.DEPLOY_USER }}
|
|
ORG_GRADLE_PROJECT_paperPassword: ${{ secrets.DEPLOY_PASS }}
|