Skip to content

Commit

Permalink
ci: don't publish snapshot on release
Browse files Browse the repository at this point in the history
  • Loading branch information
darksaid98 committed May 28, 2024
1 parent e411b16 commit e3dc75d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
tests:
name: Run Tests
uses: ./.github/workflows/tests.yml
secrets: inherit
with:
publish_snapshot: false
release:
name: Create Release
strategy:
Expand Down
19 changes: 18 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ on:
- 'master'
workflow_dispatch:
workflow_call:
secrets:
MAVEN_NAME:
required: false
MAVEN_PASSWORD:
required: false
inputs:
publish_snapshot:
required: false
default: true
type: boolean

permissions:
contents: write
Expand Down Expand Up @@ -43,9 +53,16 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
default-bump: patch


# Build with Gradle
- name: Build with Gradle
if: ${{ inputs.publish_snapshot == false }}
run: ./gradlew clean build -PcustomVersion=${{ steps.version.outputs.version }}-SNAPSHOT-${{ github.run_number }} --info

# Build with Gradle
- name: Build with Gradle
if: ${{ inputs.publish_snapshot == true }}
run: ./gradlew clean build publishAllPublicationsToSnapshotsRepository -PcustomVersion=${{ steps.version.outputs.version }}-SNAPSHOT-${{ github.run_number }} --info
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_NAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_SECRET }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_SECRET }}

0 comments on commit e3dc75d

Please sign in to comment.