Stirling-PDF/.github/workflows/releaseArtifacts.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

117 lines
3.4 KiB
YAML
Raw Permalink Normal View History

2023-06-10 16:06:01 +02:00
name: Release Artifacts
2023-08-27 12:59:08 +02:00
2023-06-10 19:06:59 +02:00
on:
2024-04-21 17:30:17 +02:00
workflow_dispatch:
2023-06-10 19:06:59 +02:00
release:
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 }}
2024-12-11 22:54:05 +01:00
STIRLING_PDF_DESKTOP_UI: false
2024-04-21 17:30:17 +02:00
- name: Get version number
id: versionNumber
run: echo "versionNumber=$(./gradlew printVersion --quiet | tail -1)" >> $GITHUB_OUTPUT
- name: Rename binarie
2024-12-11 22:54:05 +01:00
run: cp ./build/launch4j/Stirling-PDF.exe ./build/launch4j/Stirling-PDF-Server${{ matrix.file_suffix }}.exe
2024-04-21 17:30:17 +02:00
- name: Upload Assets binarie
uses: actions/upload-artifact@v4
with:
2024-12-11 22:54:05 +01:00
path: ./build/launch4j/Stirling-PDF-Server${{ matrix.file_suffix }}.exe
name: Stirling-PDF-Server${{ matrix.file_suffix }}.exe
2024-04-21 17:30:17 +02:00
overwrite: true
retention-days: 1
if-no-files-found: error
2024-12-11 23:29:58 +01:00
2024-04-21 17:30:17 +02:00
- name: Upload binaries to release
uses: softprops/action-gh-release@v2
with:
2024-12-11 23:29:58 +01:00
files: ./build/launch4j/Stirling-PDF-Server${{ matrix.file_suffix }}.exe
2024-04-21 17:30:17 +02:00
- name: Rename jar binaries
2024-12-14 12:01:49 +01:00
run: cp ./build/libs/Stirling-PDF-${{ steps.versionNumber.outputs.versionNumber }}.jar ./build/libs/Stirling-PDF${{ matrix.file_suffix }}.jar
2024-04-21 17:30:17 +02:00
- name: Upload Assets jar binaries
uses: actions/upload-artifact@v4
with:
2024-12-14 12:01:49 +01:00
path: ./build/libs/Stirling-PDF${{ matrix.file_suffix }}.jar
name: Stirling-PDF${{ matrix.file_suffix }}.jar
2024-04-21 17:30:17 +02:00
overwrite: true
retention-days: 1
if-no-files-found: error
- name: Upload jar binaries to release
uses: softprops/action-gh-release@v2
with:
2024-12-14 12:01:49 +01:00
files: ./build/libs/Stirling-PDF${{ matrix.file_suffix }}.jar
2024-12-11 22:54:05 +01:00
push-ui:
runs-on: ubuntu-latest
steps:
- 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
with:
gradle-version: 8.7
- name: Generate exe
run: ./gradlew clean createExe
env:
DOCKER_ENABLE_SECURITY: false
STIRLING_PDF_DESKTOP_UI: true
- name: Get version number
id: versionNumber
run: echo "versionNumber=$(./gradlew printVersion --quiet | tail -1)" >> $GITHUB_OUTPUT
- name: Upload Assets binarie
uses: actions/upload-artifact@v4
with:
path: ./build/launch4j/Stirling-PDF.exe
name: Stirling-PDF.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.exe