Skip to content

Commit

Permalink
added action
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudoankit committed Jan 26, 2024
1 parent 2479176 commit b64f00d
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish

on:
release:
types: [ created ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Check
run: ./gradlew check --stacktrace

- name: Publish Artifact
run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository --max-workers=1 --stacktrace
env:
RELEASE_TAG_NAME: ${{ github.event.release.tag_name }}
OSS_USERNAME: ${{ secrets.OSS_USERNAME }}
OSS_PASSWORD: ${{ secrets.OSS_PASSWORD }}
OSS_STAGING_PROFILE_ID: ${{ secrets.OSS_STAGING_PROFILE_ID }}
OSS_SIGNING_KEY_ID: ${{ secrets.OSS_SIGNING_KEY_ID }}
OSS_SIGNING_PASSWORD: ${{ secrets.OSS_SIGNING_PASSWORD }}
OSS_SIGNING_KEY: ${{ secrets.OSS_SIGNING_KEY }}
2 changes: 1 addition & 1 deletion gradle/publish-package.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apply plugin: 'signing'

ext {
GROUP_ID = "io.github.pseudoankit"
VERSION = "1.0.4"
VERSION = (System.getenv("RELEASE_TAG_NAME") ?: "SNAPSHOT").replace("v", "")

SITE_URL = 'https://github.com/pseudoankit/coachmark'
GIT_URL = 'https://github.com/pseudoankit/coachmark.git'
Expand Down

0 comments on commit b64f00d

Please sign in to comment.