Skip to content

Commit

Permalink
ci: Add workflow for continuous build releases for the develop branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Griefed committed Jul 24, 2024
1 parent 1960ffb commit 0b5d06b
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 1 deletion.
57 changes: 57 additions & 0 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Continuous

on:
push:
branches:
- develop
workflow_dispatch:

jobs:
continuous:
name: "Continuous Pre-Release"
runs-on: ubuntu-latest
steps:

- uses: actions/[email protected]

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
check-latest: true
cache: 'gradle'

- uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper

- uses: luangong/setup-install4j@v1
with:
version: 10.0.8
license: ${{ secrets.INSTALL4J_LICENSE }}

- name: Set Permissions
run: |
chmod +x gradlew
- name: Build with Gradle
run: |
./gradlew generateLicenseReport --info --full-stacktrace
./gradlew build --info --full-stacktrace
./gradlew media --info --full-stacktrace
- name: Upload to GitHub Releases
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "continuous"
prerelease: true
title: "Continuous Build"
files: |
./checksum.txt
./media/*.dmg
./media/*.sh
./media/*.exe
./serverpackcreator-app/build/libs/ServerPackCreator-dev.jar
./serverpackcreator-plugin-example/build/libs/ServerPackCreator-dev-Example-Plugin.jar
4 changes: 4 additions & 0 deletions .github/workflows/github-prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

jobs:
preparations:
name: "Preparations"
runs-on: ubuntu-latest
# OUTPUTS
outputs:
Expand All @@ -29,6 +30,7 @@ jobs:
run: echo ${{steps.tag.outputs.tag}}

jar-and-media:
name: "JAR and media"
needs: preparations
runs-on: ubuntu-latest

Expand Down Expand Up @@ -101,6 +103,7 @@ jobs:
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`

prerelease:
name: "PreRelease"
if: ${{ always() }}
runs-on: ubuntu-latest
needs: [preparations, jar-and-media]
Expand Down Expand Up @@ -193,6 +196,7 @@ jobs:
serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar
news:
name: "News on Discord"
runs-on: ubuntu-latest
needs: [preparations, prerelease]

Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/github_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:

jobs:
preparations:
name: "Preparations"
runs-on: ubuntu-latest
# OUTPUTS
outputs:
Expand All @@ -27,6 +28,7 @@ jobs:
run: echo ${{steps.tag.outputs.tag}}

jar-and-media:
name: "JAR and media"
needs: preparations
runs-on: ubuntu-latest

Expand Down Expand Up @@ -100,6 +102,7 @@ jobs:
if-no-files-found: warn # 'warn' or 'ignore' are also available, defaults to `warn`

release:
name: "Release"
if: ${{ always() }}
runs-on: ubuntu-latest
needs: [preparations, jar-and-media]
Expand Down Expand Up @@ -186,6 +189,7 @@ jobs:
serverpackcreator-plugin-example/build/libs/ServerPackCreator-${{ needs.preparations.outputs.version }}-Example-Plugin.jar
news:
name: "News on Discord"
runs-on: ubuntu-latest
needs: [preparations, release]

Expand Down Expand Up @@ -217,6 +221,7 @@ jobs:
--footer-icon "https://i.griefed.de/images/2022/01/21/start_generation.png"
pages:
name: "GitHub Pages"
runs-on: ubuntu-latest
steps:
- name: Checkout latest code
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

jobs:
jar-and-media:
name: "JAR and media"
runs-on: ubuntu-latest
steps:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update_readme.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
jobs:
blog:
runs-on: ubuntu-latest
name: Fetch and Generate Blog Posts
name: "Fetch and Generate Blog Posts"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down

0 comments on commit 0b5d06b

Please sign in to comment.