1
0
mirror of https://github.com/Stirling-Tools/Stirling-PDF.git synced 2024-11-09 17:30:12 +01:00
Stirling-PDF/.github/workflows/releaseArtifacts.yml

56 lines
1.6 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:
release:
types: [created]
2023-08-27 12:59:08 +02:00
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
file_suffix: '-with-login'
- enable_security: false
file_suffix: ''
2023-06-10 16:06:01 +02:00
steps:
- uses: actions/checkout@v3.5.2
- name: Set up JDK 17
uses: actions/setup-java@v3.11.0
with:
java-version: '17'
distribution: 'temurin'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
2023-08-27 12:59:08 +02:00
- name: Generate jar (With Security=${{ matrix.enable_security }})
2023-06-10 18:44:02 +02:00
run: ./gradlew clean createExe
2023-08-27 12:59:08 +02:00
env:
2023-08-27 20:58:20 +02:00
DOCKER_ENABLE_SECURITY: ${{ matrix.enable_security }}
2023-06-10 16:06:01 +02:00
2023-06-10 18:39:36 +02:00
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
2023-06-10 16:07:20 +02:00
with:
2023-06-10 18:39:36 +02:00
repo_token: ${{ secrets.GITHUB_TOKEN }}
2023-08-27 14:52:26 +02:00
file: ./build/launch4j/Stirling-PDF.exe
2023-08-27 15:41:02 +02:00
asset_name: Stirling-PDF${{ matrix.file_suffix }}.exe
2023-06-10 18:39:36 +02:00
tag: ${{ github.ref }}
2023-06-10 18:54:50 +02:00
overwrite: true
- name: Get version number
id: versionNumber
run: echo "::set-output name=versionNumber::$(./gradlew printVersion --quiet | tail -1)"
2023-08-27 12:59:08 +02:00
- name: Upload jar binaries to release
2023-06-10 18:39:36 +02:00
uses: svenstaro/upload-release-action@v2
2023-06-10 16:07:20 +02:00
with:
2023-06-10 18:39:36 +02:00
repo_token: ${{ secrets.GITHUB_TOKEN }}
2023-08-27 14:52:26 +02:00
file: ./build/libs/Stirling-PDF-${{ steps.versionNumber.outputs.versionNumber }}.jar
2023-08-27 15:41:02 +02:00
asset_name: Stirling-PDF${{ matrix.file_suffix }}.jar
2023-06-10 18:39:36 +02:00
tag: ${{ github.ref }}
2023-06-10 18:54:50 +02:00
overwrite: true