chore(deps): update actions/checkout action to v4 (#105) #160
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: gradle-preview-ci | |
on: | |
push: | |
branches: [ "dev/*" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure GPG Key | |
run: echo "${{secrets.SIGNING_KEY}}" | base64 --decode > /tmp/keyring.gpg | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: zulu | |
cache: "gradle" | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Build with Gradle | |
run: ./gradlew build --no-daemon -Psigning.keyId=${{secrets.SIGNING_KEY_ID}} -Psigning.password='${{secrets.SIGNING_KEY_PASSWORD}}' -Psigning.secretKeyRingFile=/tmp/keyring.gpg | |
- name: Set variables | |
id: vars | |
run: echo ::set-output name=version::${GITHUB_REF#refs/*\/dev/} | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
automatic_release_tag: "v${{ steps.vars.outputs.version }}-SNAPSHOT" | |
prerelease: true | |
title: "Development Build (${{ steps.vars.outputs.version }})" | |
files: | | |
api/build/libs/*.jar | |
platforms/*/build/libs/*(.jar|!(*-dev.jar*)) | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Configure GPG Key | |
run: echo "${{secrets.SIGNING_KEY}}" | base64 --decode > /tmp/keyring.gpg | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: zulu | |
cache: "gradle" | |
- name: Grant execute permission for gradlew | |
run: chmod +x gradlew | |
- name: Publish with Gradle | |
run: ./gradlew publish --no-daemon -Psigning.keyId=${{secrets.SIGNING_KEY_ID}} -Psigning.password='${{secrets.SIGNING_KEY_PASSWORD}}' -Psigning.secretKeyRingFile=/tmp/keyring.gpg | |
env: | |
MAVEN_REPO_USER: ${{ secrets.MAVEN_REPO_USER }} | |
MAVEN_REPO_PASS: ${{ secrets.MAVEN_REPO_PASS }} |