Skip to content

Commit

Permalink
Merge pull request #64 from NotMyFault/feat/master/cd
Browse files Browse the repository at this point in the history
Setup CD
  • Loading branch information
guysoft authored Dec 31, 2021
2 parents ebaf193 + 361b0c6 commit da32b46
Show file tree
Hide file tree
Showing 5 changed files with 329 additions and 251 deletions.
25 changes: 14 additions & 11 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# Per https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: maven
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 5
target-branch: master
reviewers:
- guysoft
labels:
- skip-changelog
- package-ecosystem: maven
directory: "/"
schedule:
interval: weekly
open-pull-requests-limit: 10
target-branch: master
reviewers:
- guysoft
labels:
- dependencies
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
3 changes: 3 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
_extends: .github
tag-template: $NEXT_PATCH_VERSION
version-template: $MAJOR.$MINOR.$PATCH
57 changes: 57 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: cd
on:
workflow_dispatch:
check_run:
types:
- completed

jobs:
validate:
runs-on: ubuntu-latest
outputs:
should_release: ${{ steps.verify-ci-status.outputs.result == 'success' && steps.interesting-categories.outputs.interesting == 'true' }}
steps:
- name: Verify CI status
uses: jenkins-infra/[email protected]
id: verify-ci-status
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
output_result: true

- name: Release Drafter
uses: release-drafter/release-drafter@v5
if: steps.verify-ci-status.outputs.result == 'success'
with:
name: next
tag: next
version: next
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check interesting categories
uses: jenkins-infra/[email protected]
id: interesting-categories
if: steps.verify-ci-status.outputs.result == 'success'
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release:
runs-on: ubuntu-latest
needs: [validate]
if: needs.validate.outputs.should_release == 'true'
steps:
- name: Check out
uses: actions/[email protected]
with:
fetch-depth: 0
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
distribution: 'adopt'
java-version: 8
- name: Release
uses: jenkins-infra/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_TOKEN: ${{ secrets.MAVEN_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Release Drafter

on:
push:
branches:
- master

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit da32b46

Please sign in to comment.