Skip to content

Commit

Permalink
File sync from s4u/.github
Browse files Browse the repository at this point in the history
  • Loading branch information
Github Action committed Dec 29, 2020
1 parent 37a143a commit 02af2e8
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Build

on:
push:
branches-ignore:
- 'dependabot/**'
branches:
- 'master'
tags:
- 'v*'

Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
github.repository_owner == 's4u'
&& (
startsWith(github.ref, 'refs/tags/')
|| ( github.ref == 'refs/heads/master' && !startsWith(github.event.head_commit.message , '[maven-release-plugin] prepare release') )
|| !startsWith(github.event.head_commit.message , '[maven-release-plugin] prepare release')
)
needs: [ verify, site-test ]
Expand Down Expand Up @@ -160,3 +160,22 @@ jobs:
git config --global user.name "GitHub Action"
- run: mvn --no-transfer-progress site-deploy

publish-release:
name: Publish Release
if: github.repository_owner == 's4u' && startsWith(github.ref, 'refs/tags/')

needs: site-deploy
runs-on: ubuntu-latest

steps:
- id: tag
run: echo "::set-output name=name::${GITHUB_REF#refs/tags/}"

- uses: release-drafter/release-drafter@v5.13.0
with:
publish: true
name: ${{ steps.tag.outputs.name }}
tag: ${{ steps.tag.outputs.name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 02af2e8

Please sign in to comment.