Skip to content

Commit

Permalink
#1579: release-workflow: Arming the workflow again, seems to work - l…
Browse files Browse the repository at this point in the history
…et's test in prod :D
  • Loading branch information
jonashackt committed Jan 15, 2021
1 parent 8cedb02 commit 1acd775
Showing 1 changed file with 40 additions and 42 deletions.
82 changes: 40 additions & 42 deletions .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

Expand All @@ -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
Expand All @@ -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

0 comments on commit 1acd775

Please sign in to comment.