Skip to content

Commit

Permalink
Enable cd workflow (#35)
Browse files Browse the repository at this point in the history
* Enable cd workflow

Signed-off-by: Steven Kriegler <[email protected]>

* Add missing GitHub workflow

Signed-off-by: Steven Kriegler <[email protected]>

* Update .github/workflows/cd.yaml

Co-authored-by: Lauris BH <[email protected]>

* Switch back to classic version syntax

Co-authored-by: Lauris BH <[email protected]>
  • Loading branch information
justusbunsi and lafriks committed Nov 17, 2021
1 parent 1ca2a80 commit 9eb9474
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_extends: .github
54 changes: 54 additions & 0 deletions .github/workflows/cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: cd
on:
workflow_dispatch:

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 }}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</parent>

<artifactId>gitea</artifactId>
<version>${revision}${changelist}</version>
<version>${revision}-${changelist}</version>
<packaging>hpi</packaging>

<name>Gitea Plugin</name>
Expand All @@ -32,7 +32,7 @@

<properties>
<revision>1.4.0</revision>
<changelist>-SNAPSHOT</changelist>
<changelist>999999-SNAPSHOT</changelist>
<java.level>8</java.level>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<argLine>-Dfile.encoding=${project.build.sourceEncoding}</argLine>
Expand Down

0 comments on commit 9eb9474

Please sign in to comment.