Skip to content

Commit

Permalink
#none: Revert to manual release trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmatt2 committed Oct 29, 2022
1 parent 1e587cd commit 68133d3
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 67 deletions.
45 changes: 28 additions & 17 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle

name: release

on:
workflow_dispatch:
inputs:
release_version:
description: 'Release Version'
required: true
default: '3.X.X'
close_and_release:
description: 'Close & Release Staging Repository'
required: true
default: 'true'

jobs:
release:
name: Release to Maven Central
name: Release to Maven Central, Tag & Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Generate tag version
uses: anothrNick/github-tag-action@v1
id: tag_version_dry_run
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: false
DRY_RUN: true
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
Expand All @@ -29,19 +24,35 @@ jobs:
run: chmod +x gradlew
- name: Jar
env:
RELEASE_VERSION: ${{ github.event.inputs.release_version }}
RELEASE_VERSION: ${{ steps.tag_version_dry_run.outputs.tag }}
run: ./gradlew shadowJar -Pversion=$RELEASE_VERSION
- name: Publish to Maven Central
env:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.GPG_PRIVATE_KEY_ASCII_ARMOR }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.GPG_KEY_PASSPHRASE }}
MAVEN_CENTRAL_TOKEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_TOKEN_USERNAME }}
MAVEN_CENTRAL_TOKEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_TOKEN_PASSWORD }}
RELEASE_VERSION: ${{ github.event.inputs.release_version }}
RELEASE_VERSION: ${{ steps.tag_version_dry_run.outputs.tag }}
run: ./gradlew -Pversion=$RELEASE_VERSION signArchives uploadArchives -PossrhUsername=${MAVEN_CENTRAL_TOKEN_USERNAME} -PossrhPassword=${MAVEN_CENTRAL_TOKEN_PASSWORD} -Psign=true
- name: Close & Release Staging Repository
if: github.event.inputs.close_and_release == 'true'
env:
MAVEN_CENTRAL_TOKEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_TOKEN_USERNAME }}
MAVEN_CENTRAL_TOKEN_PASSWORD: ${{ secrets.MAVEN_CENTRAL_TOKEN_PASSWORD }}
run: ./gradlew closeAndReleaseRepository -PossrhUsername=${MAVEN_CENTRAL_TOKEN_USERNAME} -PossrhPassword=${MAVEN_CENTRAL_TOKEN_PASSWORD}
run: ./gradlew closeAndReleaseRepository -PossrhUsername=${MAVEN_CENTRAL_TOKEN_USERNAME} -PossrhPassword=${MAVEN_CENTRAL_TOKEN_PASSWORD}
- name: Push new tag
uses: anothrNick/github-tag-action@v1
id: tag_version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: false
DRY_RUN: false
- name: Build Changelog
id: github_release
uses: mikepenz/release-changelog-builder-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Github Release
uses: softprops/action-gh-release@v1
with:
body: ${{steps.github_release.outputs.changelog}}
tag_name: ${{ steps.tag_version.outputs.tag }}
50 changes: 0 additions & 50 deletions .github/workflows/tag_and_release.yml

This file was deleted.

0 comments on commit 68133d3

Please sign in to comment.