Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♻️ refactor release flow to publish artifacts to github release #40

Merged
merged 1 commit into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 10 additions & 13 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: Create Release on Semantic Version Tag

on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
version:
description: a stable version to use (e.g. 1.2.1)

jobs:
release:
Expand All @@ -24,20 +25,16 @@ jobs:
uses: gradle/gradle-build-action@v2

- name: Execute Gradle build
run: ./gradlew build
run: ./gradlew -Pversion=${{ inputs.version }} build publishToMavenLocal
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSPHRASE }}


- name: "Create release"
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
files: |
build/libs/java-security-*.jar

- name: "Publish to Maven Central"
run: ./gradlew publishNebulaPublicationToSonatypeRepository closeAndReleaseSonatypeStagingRepository
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSPHRASE }}
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.OSSRH_USERNAME }}
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.OSSRH_TOKEN }}
~/.m2/repository/io/github/pixee/java-security-toolkit/${{ inputs.version }}/java-security-*
1 change: 0 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ tasks.named(java11SourceSet.jarTaskName) {
}

group = "io.github.pixee"
version = "1.2.1"
description = "java-security-toolkit"


Expand Down
Loading