Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #123

Merged
merged 3 commits into from
Nov 7, 2024
Merged

Fixes #123

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches:
- master

name: Test build
name: Build Docker Image

jobs:
build:
Expand Down
78 changes: 11 additions & 67 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Generate changelog
id: changelog
uses: metcalfc/[email protected]
with:
myToken: ${{ secrets.GITHUB_TOKEN }}
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
Expand All @@ -36,69 +31,18 @@ jobs:
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Get Maven version
run: echo "::set-env name=VERSION::$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)"
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: echo "VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this Release:
${{ steps.changelog.outputs.changelog }}
name: Release ${{ github.ref }}
draft: true
prerelease: false
- name: Upload Server Jar
id: upload-server-jar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: server/target/server-${{ env.VERSION }}.jar
asset_name: server-${{ env.VERSION }}.jar
asset_content_type: application/jar
- name: Upload Editor Jar
id: upload-editor-jar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: editor/target/editor-${{ env.VERSION }}.jar
asset_name: editor-${{ env.VERSION }}.jar
asset_content_type: application/jar
- name: Upload Client Jar
id: upload-client-jar
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: client/target/client-${{ env.VERSION }}.jar
asset_name: client-${{ env.VERSION }}.jar
asset_content_type: application/jar
- name: Upload Client exe
id: upload-client-exe
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: client/target/client-${{ env.VERSION }}.exe
asset_name: client-${{ env.VERSION }}.exe
asset_content_type: application/exe
- name: Upload Client dmg
id: upload-client-dmg
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: client/target/client-${{ env.VERSION }}.dmg
asset_name: client-${{ env.VERSION }}.dmg
asset_content_type: application/octet-stream
fail_on_unmatched_files: true
generate_release_notes: true
files: |
server/target/server-${{ env.VERSION }}.jar
editor/target/editor-${{ env.VERSION }}.jar
client/target/client-${{ env.VERSION }}.jar
client/target/client-${{ env.VERSION }}.exe
client/target/client-${{ env.VERSION }}.dmg