Skip to content

Commit

Permalink
Add publish action
Browse files Browse the repository at this point in the history
  • Loading branch information
kylecorry31 committed Dec 19, 2024
1 parent 6de3e08 commit 220b2e9
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish to Maven Central

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
ref: ${{ github.event.release.tag_name }}

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: "temurin"
java-version: 17

- name: Grant execute permission for gradlew
run: chmod +x gradlew

- name: Publish to Maven Central
run: ./gradlew publishAndReleaseToMavenCentral --no-configuration-cache
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_KEY_PASSWORD }}

2 changes: 1 addition & 1 deletion release.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
contents = gradle.read()
gradle.close()

version_name = re.search('version = "(.+)"', contents).group(1)
version_name = re.search('versionName = "(.+)"', contents).group(1)

print("Creating draft release for version", version_name)

Expand Down

0 comments on commit 220b2e9

Please sign in to comment.