Skip to content

Commit

Permalink
adding command to publish artifacts or not
Browse files Browse the repository at this point in the history
  • Loading branch information
Dpbm committed Jan 27, 2025
1 parent a4bc0b5 commit b3856b1
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/publish-test-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ jobs:
GPG_KEY: ${{ secrets.GPG_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
GPG_KEYID: ${{ secrets.GPG_KEYID }}
with:
env: 'test'
9 changes: 9 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: (Reusable Workflow) Publish packages
on:
workflow_call:
inputs:
env:
required: true
type: string
description: 'Set as production to publish your artifacts'
secrets:
GPG_KEY:
description: 'Your private GPG KEY'
Expand Down Expand Up @@ -37,3 +42,7 @@ jobs:
# check out: https://docs.gradle.org/current/userguide/signing_plugin.html
- name: Setup Gradle Signing
run: gradle sign -Psigning.secretKeyRingFile=../../../.gnupg/secring.gpg -Psigning.password=${{ secrets.GPG_PASSWORD }} -Psigning.keyId=${{ secrets.GPG_KEYID }}

- name: Publish
if: ${{ inputs.env == 'production' }}
run: ./gradlew publish
2 changes: 2 additions & 0 deletions .github/workflows/release-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ jobs:
GPG_KEY: ${{ secrets.GPG_KEY }}
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
GPG_KEYID: ${{ secrets.GPG_KEYID }}
with:
env: 'production'

0 comments on commit b3856b1

Please sign in to comment.