Build snapshot #5
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: Publish Snapshot | |
on: | |
push: | |
branches: | |
- dev/** | |
jobs: | |
publish-snapshot: | |
env: | |
ORG_GRADLE_PROJECT_githubPassword: ${{ secrets.GITHUB_TOKEN }} | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
cache: gradle | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Ensure Gradle Wrapper is Downloaded | |
run: ./gradlew --version | |
- name: Get Version | |
run: echo "CURRENT_VERSION=$(./gradlew :printVersion --quiet)" >> $GITHUB_ENV | |
- name: Print Project Version | |
run: echo "Project version is ${{ env.CURRENT_VERSION }}" | |
- name: Publish artifact | |
if: ${{ endsWith(env.CURRENT_VERSION, '-SNAPSHOT') }} | |
run: ./gradlew publish |