1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-11-14 03:20:14 +01:00
Stirling-PDF/.github/workflows/releaseArtifacts.yml

76 lines
2.3 KiB
YAML
Raw Normal View History

2023-06-10 16:06:01 +02:00
name: Release Artifacts
2023-08-27 12:59:08 +02:00
2024-02-11 17:47:00 +01:00
on:
2024-04-21 17:30:17 +02:00
workflow_dispatch:
2024-02-11 17:47:00 +01:00
release:
2023-06-10 19:06:59 +02:00
types: [created]
2024-01-03 19:51:41 +01:00
permissions:
2024-01-07 00:06:58 +01:00
contents: write
2024-01-03 19:51:41 +01:00
packages: write
2023-06-10 16:06:01 +02:00
jobs:
2023-06-10 18:39:36 +02:00
push:
2023-06-10 16:06:01 +02:00
runs-on: ubuntu-latest
2023-08-27 12:59:08 +02:00
strategy:
matrix:
enable_security: [true, false]
include:
- enable_security: true
2024-04-21 17:30:17 +02:00
file_suffix: "-with-login"
2023-08-27 12:59:08 +02:00
- enable_security: false
2024-04-21 17:30:17 +02:00
file_suffix: ""
2023-06-10 16:06:01 +02:00
steps:
2024-04-21 17:30:17 +02:00
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: "17"
distribution: "temurin"
- uses: gradle/actions/setup-gradle@v4
2024-04-21 17:30:17 +02:00
with:
2024-05-27 19:12:06 +02:00
gradle-version: 8.7
2024-04-21 17:30:17 +02:00
- name: Generate jar (With Security=${{ matrix.enable_security }})
run: ./gradlew clean createExe
env:
DOCKER_ENABLE_SECURITY: ${{ matrix.enable_security }}
- name: Get version number
id: versionNumber
run: echo "versionNumber=$(./gradlew printVersion --quiet | tail -1)" >> $GITHUB_OUTPUT
- name: Rename binarie
if: matrix.file_suffix != ''
run: cp ./build/launch4j/Stirling-PDF.exe ./build/launch4j/Stirling-PDF${{ matrix.file_suffix }}.exe
- name: Upload Assets binarie
uses: actions/upload-artifact@v4
with:
path: ./build/launch4j/Stirling-PDF${{ matrix.file_suffix }}.exe
name: Stirling-PDF${{ matrix.file_suffix }}.exe
overwrite: true
retention-days: 1
if-no-files-found: error
- name: Upload binaries to release
uses: softprops/action-gh-release@v2
with:
files: ./build/launch4j/Stirling-PDF${{ matrix.file_suffix }}.exe
- name: Rename jar binaries
run: cp ./build/libs/Stirling-PDF-${{ steps.versionNumber.outputs.versionNumber }}.jar ./build/libs/Stirling-PDF${{ matrix.file_suffix }}.jar
- name: Upload Assets jar binaries
uses: actions/upload-artifact@v4
with:
path: ./build/libs/Stirling-PDF${{ matrix.file_suffix }}.jar
name: Stirling-PDF${{ matrix.file_suffix }}.jar
overwrite: true
retention-days: 1
if-no-files-found: error
- name: Upload jar binaries to release
uses: softprops/action-gh-release@v2
with:
files: ./build/libs/Stirling-PDF${{ matrix.file_suffix }}.jar