From f3460d82f87591ebf1260e02ef7565f5e8eb00f3 Mon Sep 17 00:00:00 2001
From: Jacek Kowalski <Jacek@jacekk.info>
Date: Fri, 24 Nov 2023 15:26:10 +0000
Subject: [PATCH] Remove unused imports

---
 .github/workflows/release.yml |   31 +++++++++++--------------------
 1 files changed, 11 insertions(+), 20 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 71e01a5..8163160 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -5,6 +5,8 @@
 
 name: Release
 
+permissions: {}
+
 jobs:
   build:
     name: Build
@@ -19,7 +21,7 @@
         uses: actions/setup-java@v3
         with:
           distribution: zulu
-          java-version: 11
+          java-version: 17
 
       - id: vars
         name: Get project variables
@@ -57,7 +59,7 @@
     steps:
       - id: checkout
         name: Checkout code
-        uses: actions/checkout@v2
+        uses: actions/checkout@v3
 
       - id: download_artifact
         name: Download artifact
@@ -108,6 +110,8 @@
     name: Release
     runs-on: ubuntu-latest
     needs: [build, test]
+    permissions:
+      contents: write
     steps:
       - id: download_artifact
         name: Download artifact
@@ -117,22 +121,9 @@
 
       - id: create_release
         name: Create release
-        uses: actions/create-release@v1
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        uses: softprops/action-gh-release@v1
         with:
-          tag_name: ${{ github.ref }}
-          release_name: ${{ needs.build.outputs.project_name }} ${{ needs.build.outputs.project_version }}
-          draft: false
-          prerelease: false
-
-      - id: upload_release
-        name: Upload release artifact
-        uses: actions/upload-release-asset@v1
-        env:
-          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-        with:
-          upload_url: ${{ steps.create_release.outputs.upload_url }}
-          asset_path: ${{ needs.build.outputs.artifact_id }}-${{ needs.build.outputs.project_version }}.jar
-          asset_name: ${{ needs.build.outputs.artifact_id }}-${{ needs.build.outputs.project_version }}.jar
-          asset_content_type: application/java-archive
+          name: ${{ needs.build.outputs.project_name }} ${{ needs.build.outputs.project_version }}
+          files: ${{ needs.build.outputs.artifact_id }}-${{ needs.build.outputs.project_version }}.jar
+          fail_on_unmatched_files: true
+          generate_release_notes: true

--
Gitblit v1.9.1