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

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

82 lines
2.8 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
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:
- name: Harden Runner
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2024-04-21 17:30:17 +02:00
- name: Set up JDK 17
uses: actions/setup-java@7a6d8a8234af8eb26422e24e3006232cccaa061b # v4.6.0
2024-04-21 17:30:17 +02:00
with:
java-version: "17"
distribution: "temurin"
- uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
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@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
2024-04-21 17:30:17 +02:00
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@7b4da11513bf3f43f9999e90eabced41ab8bb048 # v2.2.0
2024-04-21 17:30:17 +02:00
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@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
2024-04-21 17:30:17 +02:00
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@7b4da11513bf3f43f9999e90eabced41ab8bb048 # v2.2.0
2024-04-21 17:30:17 +02:00
with:
2024-12-14 12:01:49 +01:00
files: ./build/libs/Stirling-PDF${{ matrix.file_suffix }}.jar