Skip to content

Commit

Permalink
Add snapshot pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
guillermocalvo committed Dec 12, 2023
1 parent 3516187 commit c1d4771
Showing 1 changed file with 52 additions and 0 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

# Publish a Snapshot Release
name: Snapshot

on:
push:
branches:
- 'develop'

jobs:
build:

name: Publish snapshot
runs-on: ubuntu-latest

steps:

# ================================
# SHALLOW CLONE
# ================================
- name: Shallow clone
uses: actions/checkout@v3

# ================================
# SET UP JDK
# ================================
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-package: jdk
java-version: 21

# ================================
# EXPORT GRADLE PROJECT PROPERTIES
# ================================
- name: Export Gradle project properties
id: properties
run: './gradlew properties -q | grep ": " | sed "s/: /=/" >> "$GITHUB_OUTPUT"'

# ================================
# PUBLISH
# ================================
- name: Publish snapshot
if: endsWith(steps.properties.outputs.version, '-SNAPSHOT')
env:
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_sonatypeStagingProfileId: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
uses: gradle/gradle-build-action@v2
with:
arguments: publish -Psnapshot --info --scan

0 comments on commit c1d4771

Please sign in to comment.