From 74fd8bb03bc1ae06dc7db477f7c3355ee6a93fe8 Mon Sep 17 00:00:00 2001 From: Philipp van Kempen Date: Mon, 4 Nov 2024 11:20:21 +0100 Subject: [PATCH 1/3] .github/workflows/docker.yml: fix workflow name --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 14ae8867..b4104f6a 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -6,7 +6,7 @@ on: branches: - master -name: Test build +name: Build Docker Image jobs: build: From 98480cd357d734e4987dcf99f39be7fc38ae90a2 Mon Sep 17 00:00:00 2001 From: Philipp van Kempen Date: Mon, 4 Nov 2024 11:21:56 +0100 Subject: [PATCH 2/3] .github/workflows/release.yml: migrate to softprops/action-gh-release --- .github/workflows/release.yml | 74 +++++------------------------------ 1 file changed, 10 insertions(+), 64 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5e1d0e35..fe42b487 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,11 +13,6 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 - - name: Generate changelog - id: changelog - uses: metcalfc/changelog-generator@v4.3.1 - with: - myToken: ${{ secrets.GITHUB_TOKEN }} - name: Set up JDK 21 uses: actions/setup-java@v4 with: @@ -40,65 +35,16 @@ jobs: env: ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true' - 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 From 19b04c2f8d0af3f13aca9ea9007fd3c05a1239c4 Mon Sep 17 00:00:00 2001 From: Philipp van Kempen Date: Mon, 4 Nov 2024 11:24:52 +0100 Subject: [PATCH 3/3] .github/workflows/release.yml: avoid ACTIONS_ALLOW_UNSECURE_COMMANDS --- .github/workflows/release.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fe42b487..d8c3071d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,9 +31,7 @@ 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 uses: softprops/action-gh-release@v2 with: