Skip to content

Commit

Permalink
Merge pull request #11 from microsphere-projects/dev
Browse files Browse the repository at this point in the history
Release depends on workflow_dispatch
  • Loading branch information
mercyblitz authored Aug 7, 2024
2 parents 9e357f1 + 3687a59 commit b7865c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@
name: Gradle Package

on:
pull_request:
push:
branches: [ "release" ]
workflow_dispatch:
inputs:
revision:
description: 'The revision to build'
required: true
default: '0.0.1-SNAPSHOT'

jobs:
build:
Expand Down Expand Up @@ -38,10 +44,8 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@dbbdc275be76ac10734476cc723d82dfe7ec6eda # v3.4.2

# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
# the publishing section of your build.gradle
- name: Build and Publish with Gradle to GitHub Packages
run: ./gradlew build publish
run: ./gradlew build publish -Drevision=${{ inputs.revision }}
env:
OSSRH_MAVEN_USERNAME: ${{ secrets.OSS_SONATYPE_USERNAME }}
OSSRH_MAVEN_PASSWORD: ${{ secrets.OSS_SONATYPE_PASSWORD }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ plugins {
}

group = "io.github.microsphere-projects"
version = "0.0.1-SNAPSHOT"
version = System.getProperty("revision", "0.0.1-SNAPSHOT")

repositories {
// Use the plugin portal to apply community plugins in convention plugins.
Expand Down

0 comments on commit b7865c8

Please sign in to comment.