Skip to content

Commit

Permalink
workflow for pre-releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Lurkars committed Feb 16, 2024
1 parent 5550dee commit a49921b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 4 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/release-pre.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: "Build and publish pre-release"

on:
workflow_dispatch:

jobs:
create_release:
name: Create Pre-Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "adopt"
- name: Build with default Maven
run: mvn --batch-mode --update-snapshots package
- name: Build with postgresql Maven
run: mvn --batch-mode --update-snapshots package -P db-postgresql
- name: Build with mariadb Maven
run: mvn --batch-mode --update-snapshots package -P db-mariadb
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
prerelease: true
files: |
./target/ghs-server-${{github.ref_name}}.jar
./target/ghs-server-${{github.ref_name}}-postgresql.jar
./target/ghs-server-${{github.ref_name}}-mariadb.jar
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
create_release:
name: Release JAR
name: Create Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -19,14 +19,15 @@ jobs:
java-version: "17"
distribution: "adopt"
- name: Build with default Maven
run: mvn --batch-mode --update-snapshots clean package
run: mvn --batch-mode --update-snapshots package
- name: Build with postgresql Maven
run: mvn --batch-mode --update-snapshots clean package -P db-postgresql
run: mvn --batch-mode --update-snapshots package -P db-postgresql
- name: Build with mariadb Maven
run: mvn --batch-mode --update-snapshots clean package -P db-mariadb
run: mvn --batch-mode --update-snapshots package -P db-mariadb
- name: Release
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
files: |
./target/ghs-server-${{github.ref_name}}.jar
./target/ghs-server-${{github.ref_name}}-postgresql.jar
Expand Down

0 comments on commit a49921b

Please sign in to comment.