Skip to content

Commit

Permalink
Add environment secrets to release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
reline committed May 7, 2024
1 parent f805375 commit d609c94
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
name: Release

on:
workflow_dispatch

name: Publish Release
on: workflow_dispatch
jobs:
build:

publish:
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -24,8 +20,16 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0

- name: Build
run: ./gradlew build

- name: Publish
run: ./gradlew build publishAndReleaseToMavenCentral --no-configuration-cache
run: ./gradlew publishAndReleaseToMavenCentral
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_PRIVATE_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}

- name: Get Release Version
shell: bash
Expand Down

0 comments on commit d609c94

Please sign in to comment.