migrate to gradle extension #3
Workflow file for this run
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 Publish | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: read | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
- name: make gradle wrapper executable | |
if: ${{ runner.os != 'Windows' }} | |
run: chmod +x ./gradlew | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Set env variables | |
id: vars | |
run: echo "tag=${GITHUB_REF#refs/*/}" >> $GITHUB_OUTPUT | |
- name: Publish to Repository | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: 'publish --stacktrace' | |
env: | |
CI_VERSION: ${{ steps.vars.outputs.tag }} | |
DEPLOY_URL: ${{ secrets.DEPLOY_URL }} | |
DEPLOY_USER: ${{ secrets.DEPLOY_USER }} | |
DEPLOY_PASSWORD: ${{ secrets.DEPLOY_PASSWORD }} |