forked from PaperMC/Paperclip
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (34 loc) · 1.09 KB
/
deploy-snapshot.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Deploy Snapshot
on:
push:
branches: ['leavesclip']
paths-ignore:
- 'license.txt'
- 'readme.md'
- '.gitignore'
- '.gitattributes'
jobs:
deploy:
name: Deploy Snapshot
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1
- uses: actions/setup-java@v3
with:
java-version: 21
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_leavesmcUsername: ${{ secrets.NEW_REPO_PASSWORD }}
ORG_GRADLE_PROJECT_leavesmcPassword: ${{ secrets.NEW_REPO_USERNAME }}