|
|
|
@ -4,6 +4,10 @@ jobs: |
|
|
|
|
build: |
|
|
|
|
runs-on: ubuntu-latest |
|
|
|
|
steps: |
|
|
|
|
- uses: actions/cache@v3 |
|
|
|
|
with: |
|
|
|
|
path: ~/.ssh/known_hosts |
|
|
|
|
key: ssh-known-hosts |
|
|
|
|
- uses: actions/checkout@v3 |
|
|
|
|
- uses: actions/setup-java@v3 |
|
|
|
|
with: |
|
|
|
@ -13,3 +17,18 @@ jobs: |
|
|
|
|
- uses: gradle/gradle-build-action@v2 |
|
|
|
|
with: |
|
|
|
|
arguments: build |
|
|
|
|
- if: github.ref == 'refs/heads/master' |
|
|
|
|
run: | |
|
|
|
|
install -dm0700 ~/.ssh |
|
|
|
|
touch ~/.ssh/id_ed25519 |
|
|
|
|
chmod 0600 ~/.ssh/id_ed25519 |
|
|
|
|
echo "${SSH_KEY}" > ~/.ssh/id_ed25519 |
|
|
|
|
env: |
|
|
|
|
SSH_KEY: ${{ secrets.SSH_KEY }} |
|
|
|
|
- if: github.ref == 'refs/heads/master' |
|
|
|
|
uses: gradle/gradle-build-action@v2 |
|
|
|
|
with: |
|
|
|
|
arguments: publish |
|
|
|
|
env: |
|
|
|
|
ORG_GRADLE_PROJECT_openrs2Username: ${{ secrets.REPO_USERNAME }} |
|
|
|
|
ORG_GRADLE_PROJECT_openrs2Password: ${{ secrets.REPO_PASSWORD }} |
|
|
|
|