From 1acd7756adb7c3c44b5263286257543617805189 Mon Sep 17 00:00:00 2001 From: Jonas Hecht Date: Fri, 15 Jan 2021 18:35:31 +0100 Subject: [PATCH] #1579: release-workflow: Arming the workflow again, seems to work - let's test in prod :D --- .../workflows/release-to-maven-central.yml | 82 +++++++++---------- 1 file changed, 40 insertions(+), 42 deletions(-) diff --git a/.github/workflows/release-to-maven-central.yml b/.github/workflows/release-to-maven-central.yml index 02766bb4da3..f341b4e4beb 100644 --- a/.github/workflows/release-to-maven-central.yml +++ b/.github/workflows/release-to-maven-central.yml @@ -1,20 +1,18 @@ name: release-to-maven-central -#on: -# workflow_dispatch: -# inputs: -# releaseversion: -# description: 'Release version' -# required: true -# default: '2.4.0' - -on: [push] +on: + workflow_dispatch: + inputs: + releaseversion: + description: 'Release version' + required: true + default: '2.4.0' jobs: publish-central-and-pages: runs-on: ubuntu-latest steps: - - run: echo "Will start a Maven Central upload with version 2.1.1" # ${{ github.event.inputs.releaseversion }}" + - run: echo "Will start a Maven Central upload with version ${{ github.event.inputs.releaseversion }}" - uses: actions/checkout@v2 @@ -29,7 +27,7 @@ jobs: gpg-passphrase: MAVEN_GPG_PASSPHRASE - name: Set projects Maven version to GitHub Action GUI set version - run: mvn versions:set "-DnewVersion=2.1.1" --no-transfer-progress # "-DnewVersion=${{ github.event.inputs.releaseversion }}" --no-transfer-progress + run: mvn versions:set "-DnewVersion=${{ github.event.inputs.releaseversion }}" --no-transfer-progress - name: Publish package run: mvn --batch-mode clean deploy --no-transfer-progress -P central-deploy -DskipTests=true @@ -44,37 +42,37 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: gh-pages # The branch the action should deploy to. FOLDER: spring-boot-admin-docs/target/generated-docs # The folder the action should deploy. - TARGET_FOLDER: 2.4.0-SNAPSHOT # ${{ github.event.inputs.releaseversion }} + TARGET_FOLDER: ${{ github.event.inputs.releaseversion }} CLEAN: true # Automatically remove deleted files from the deploy branch -# publish-github-release: -# needs: publish-central-and-pages -# runs-on: ubuntu-latest -# -# steps: -# - uses: actions/checkout@v2 -# -# - name: Generate changelog -# id: changelog -# uses: metcalfc/changelog-generator@v0.4.4 -# with: -# myToken: ${{ secrets.GITHUB_TOKEN }} -# -# - name: Create GitHub Release -# id: create_release -# uses: actions/create-release@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# with: -# tag_name: ${{ github.event.inputs.releaseversion }} -# release_name: ${{ github.event.inputs.releaseversion }} -# body: | -# Grab the new version from Maven central https://repo1.maven.org/maven2/de/codecentric/ -# -# Current docs at https://codecentric.github.io/spring-boot-admin/${{ github.event.inputs.releaseversion }}/ -# -# ### Things that changed in this release -# ${{ steps.changelog.outputs.changelog }} -# draft: false -# prerelease: false + publish-github-release: + needs: publish-central-and-pages + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Generate changelog + id: changelog + uses: metcalfc/changelog-generator@v0.4.4 + with: + myToken: ${{ secrets.GITHUB_TOKEN }} + + - name: Create GitHub Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.event.inputs.releaseversion }} + release_name: ${{ github.event.inputs.releaseversion }} + body: | + Grab the new version from Maven central https://repo1.maven.org/maven2/de/codecentric/ + + Current docs at https://codecentric.github.io/spring-boot-admin/${{ github.event.inputs.releaseversion }}/ + + ### Things that changed in this release + ${{ steps.changelog.outputs.changelog }} + draft: false + prerelease: false