Skip to content

Commit

Permalink
Merge pull request #42 from matzehecht/next
Browse files Browse the repository at this point in the history
Next
  • Loading branch information
matzehecht authored Dec 18, 2022
2 parents 821f457 + 37e286f commit 680378b
Show file tree
Hide file tree
Showing 10 changed files with 128 additions and 122 deletions.
67 changes: 33 additions & 34 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ jobs:
env:
cache-name: cache-pdftotext-windows
with:
path: xpdf-tools-win-4.03.zip
path: xpdf-tools-win-4.04.zip
key: ${{ runner.os }}-build-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}
Expand All @@ -147,27 +147,27 @@ jobs:
- name: Download pdftotext
if: ${{ matrix.os == 'windows' }}
run: |
if(!(Test-Path -Path "xpdf-tools-win-4.03.zip")) {
Invoke-WebRequest -Uri "https://dl.xpdfreader.com/xpdf-tools-win-4.03.zip" -OutFile "xpdf-tools-win-4.03.zip"
if(!(Test-Path -Path "xpdf-tools-win-4.04.zip")) {
Invoke-WebRequest -Uri "https://dl.xpdfreader.com/xpdf-tools-win-4.04.zip" -OutFile "xpdf-tools-win-4.04.zip"
}
Expand-Archive -Path xpdf-tools-win-4.03.zip
Expand-Archive -Path xpdf-tools-win-4.04.zip
- name: Copy pdftotext
if: ${{ matrix.os == 'windows' && matrix.arch == 'x64' }}
run: |
New-Item -path "lib\pdftotext\win" -type directory
Copy-Item "xpdf-tools-win-4.03\xpdf-tools-win-4.03\bin64\pdftotext.exe" -Destination "lib\pdftotext\win\pdftotext64.exe"
Copy-Item "xpdf-tools-win-4.04\xpdf-tools-win-4.04\bin64\pdftotext.exe" -Destination "lib\pdftotext\win\pdftotext64.exe"
- name: Copy pdftotext
if: ${{ matrix.os == 'windows' && matrix.arch == 'x86' }}
run: |
New-Item -path "lib\pdftotext\win" -type directory
Copy-Item "xpdf-tools-win-4.03\xpdf-tools-win-4.03\bin32\pdftotext.exe" -Destination "lib\pdftotext\win\pdftotext32.exe"
Copy-Item "xpdf-tools-win-4.04\xpdf-tools-win-4.04\bin32\pdftotext.exe" -Destination "lib\pdftotext\win\pdftotext32.exe"
- name: Cache pdftotext
uses: actions/cache@v2
if: ${{ matrix.os == 'linux' }}
env:
cache-name: cache-pdftotext-linux
with:
path: xpdf-tools-linux-4.03.tar.gz
path: xpdf-tools-linux-4.04.tar.gz
key: ${{ matrix.os }}-build-${{ env.cache-name }}
restore-keys: |
${{ matrix.os }}-build-${{ env.cache-name }}
Expand All @@ -176,20 +176,20 @@ jobs:
- name: Download pdftotext linux
if: ${{ matrix.os == 'linux' }}
run: |
if [ ! -f xpdf-tools-linux-4.03.tar.gz ]; then
curl https://dl.xpdfreader.com/xpdf-tools-linux-4.03.tar.gz -o xpdf-tools-linux-4.03.tar.gz
if [ ! -f xpdf-tools-linux-4.04.tar.gz ]; then
curl https://dl.xpdfreader.com/xpdf-tools-linux-4.04.tar.gz -o xpdf-tools-linux-4.04.tar.gz
fi
tar -xvzf xpdf-tools-linux-4.03.tar.gz
tar -xvzf xpdf-tools-linux-4.04.tar.gz
- name: Copy pdftotext
if: ${{ matrix.os == 'linux' && matrix.arch == 'x64' }}
run: |
mkdir "lib/pdftotext/linux" --parents
cp xpdf-tools-linux-4.03/bin64/pdftotext lib/pdftotext/linux/pdftotext64
cp xpdf-tools-linux-4.04/bin64/pdftotext lib/pdftotext/linux/pdftotext64
- name: Copy pdftotext
if: ${{ matrix.os == 'linux' && matrix.arch == 'x86' }}
run: |
mkdir "lib/pdftotext/linux" --parents
cp xpdf-tools-linux-4.03/bin32/pdftotext lib/pdftotext/linux/pdftotext32
cp xpdf-tools-linux-4.04/bin32/pdftotext lib/pdftotext/linux/pdftotext32
- uses: ./.github/actions/nexe-compile
name: Compile ${{ matrix.type }} for ${{ matrix.os }} ${{ matrix.arch }}
with:
Expand Down Expand Up @@ -276,44 +276,44 @@ jobs:
env:
cache-name: cache-pdftotext-windows
with:
path: xpdf-tools-win-4.03.zip
path: xpdf-tools-win-4.04.zip
key: ${{ runner.os }}-build-${{ env.cache-name }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}
${{ runner.os }}-build-
${{ runner.os }}-
- name: Download pdftotext
run: |
if(!(Test-Path -Path "xpdf-tools-win-4.03.zip")) {
Invoke-WebRequest -Uri "https://dl.xpdfreader.com/xpdf-tools-win-4.03.zip" -OutFile "xpdf-tools-win-4.03.zip"
if(!(Test-Path -Path "xpdf-tools-win-4.04.zip")) {
Invoke-WebRequest -Uri "https://dl.xpdfreader.com/xpdf-tools-win-4.04.zip" -OutFile "xpdf-tools-win-4.04.zip"
}
Expand-Archive -Path .\xpdf-tools-win-4.03.zip
Expand-Archive -Path .\xpdf-tools-win-4.04.zip
- name: Copy pdftotext
if: ${{ matrix.arch == 'x64' }}
run: |
New-Item -path "lib\pdftotext\win" -type directory
Copy-Item "xpdf-tools-win-4.03\xpdf-tools-win-4.03\bin64\pdftotext.exe" -Destination "lib\pdftotext\win\pdftotext64.exe"
Copy-Item "xpdf-tools-win-4.04\xpdf-tools-win-4.04\bin64\pdftotext.exe" -Destination "lib\pdftotext\win\pdftotext64.exe"
- name: Copy pdftotext
if: ${{ matrix.arch == 'x86' }}
run: |
New-Item -path "lib\pdftotext\win" -type directory
Copy-Item "xpdf-tools-win-4.03\xpdf-tools-win-4.03\bin32\pdftotext.exe" -Destination "lib\pdftotext\win\pdftotext32.exe"
Copy-Item "xpdf-tools-win-4.04\xpdf-tools-win-4.04\bin32\pdftotext.exe" -Destination "lib\pdftotext\win\pdftotext32.exe"
- name: Write key file
run: |
$bytes = [Convert]::FromBase64String("${{ secrets.PFX_CERTIFICATE }}")
[IO.File]::WriteAllBytes("emapc.pfx", $bytes)
- name: Sign binaries
if: ${{ matrix.arch == 'x64' }}
run: |
lib/signtool.exe sign /f emapc.pfx /p "${{ secrets.PFX_CERTIFICATE_PWD }}" /sha1 "${{ secrets.PFX_CERTIFICATE_SHA1 }}" /fd sha256 /d "emapc service" /t "${{ secrets.PFX_CERTIFICATE_TIMESTAMP_SERVER }}" /v bin/service/windows/emapc-service-windows-${{ matrix.arch }}.exe
lib/signtool.exe sign /f emapc.pfx /p "${{ secrets.PFX_CERTIFICATE_PWD }}" /sha1 "${{ secrets.PFX_CERTIFICATE_SHA1 }}" /fd sha256 /d "pdftotext" /t "${{ secrets.PFX_CERTIFICATE_TIMESTAMP_SERVER }}" /v lib/pdftotext/win/pdftotext64.exe
lib/signtool.exe sign /f emapc.pfx /p "${{ secrets.PFX_CERTIFICATE_PWD }}" /sha1 "${{ secrets.PFX_CERTIFICATE_SHA1 }}" /fd sha256 /d "nssm" /t "${{ secrets.PFX_CERTIFICATE_TIMESTAMP_SERVER }}" /v lib/nssm/nssm64.exe
- name: Sign binaries
if: ${{ matrix.arch == 'x86' }}
run: |
lib/signtool.exe sign /f emapc.pfx /p "${{ secrets.PFX_CERTIFICATE_PWD }}" /sha1 "${{ secrets.PFX_CERTIFICATE_SHA1 }}" /fd sha256 /d "emapc service" /t "${{ secrets.PFX_CERTIFICATE_TIMESTAMP_SERVER }}" /v bin/service/windows/emapc-service-windows-${{ matrix.arch }}.exe
lib/signtool.exe sign /f emapc.pfx /p "${{ secrets.PFX_CERTIFICATE_PWD }}" /sha1 "${{ secrets.PFX_CERTIFICATE_SHA1 }}" /fd sha256 /d "pdftotext" /t "${{ secrets.PFX_CERTIFICATE_TIMESTAMP_SERVER }}" /v lib/pdftotext/win/pdftotext32.exe
lib/signtool.exe sign /f emapc.pfx /p "${{ secrets.PFX_CERTIFICATE_PWD }}" /sha1 "${{ secrets.PFX_CERTIFICATE_SHA1 }}" /fd sha256 /d "nssm" /t "${{ secrets.PFX_CERTIFICATE_TIMESTAMP_SERVER }}" /v lib/nssm/nssm32.exe
# - name: Sign binaries
# if: ${{ matrix.arch == 'x64' }}
# run: |
# lib/signtool.exe sign /f emapc.pfx /p "${{ secrets.PFX_CERTIFICATE_PWD }}" /sha1 "${{ secrets.PFX_CERTIFICATE_SHA1 }}" /fd sha256 /d "emapc service" /t "${{ secrets.PFX_CERTIFICATE_TIMESTAMP_SERVER }}" /v bin/service/windows/emapc-service-windows-${{ matrix.arch }}.exe
# lib/signtool.exe sign /f emapc.pfx /p "${{ secrets.PFX_CERTIFICATE_PWD }}" /sha1 "${{ secrets.PFX_CERTIFICATE_SHA1 }}" /fd sha256 /d "pdftotext" /t "${{ secrets.PFX_CERTIFICATE_TIMESTAMP_SERVER }}" /v lib/pdftotext/win/pdftotext64.exe
# lib/signtool.exe sign /f emapc.pfx /p "${{ secrets.PFX_CERTIFICATE_PWD }}" /sha1 "${{ secrets.PFX_CERTIFICATE_SHA1 }}" /fd sha256 /d "nssm" /t "${{ secrets.PFX_CERTIFICATE_TIMESTAMP_SERVER }}" /v lib/nssm/nssm64.exe
# - name: Sign binaries
# if: ${{ matrix.arch == 'x86' }}
# run: |
# lib/signtool.exe sign /f emapc.pfx /p "${{ secrets.PFX_CERTIFICATE_PWD }}" /sha1 "${{ secrets.PFX_CERTIFICATE_SHA1 }}" /fd sha256 /d "emapc service" /t "${{ secrets.PFX_CERTIFICATE_TIMESTAMP_SERVER }}" /v bin/service/windows/emapc-service-windows-${{ matrix.arch }}.exe
# lib/signtool.exe sign /f emapc.pfx /p "${{ secrets.PFX_CERTIFICATE_PWD }}" /sha1 "${{ secrets.PFX_CERTIFICATE_SHA1 }}" /fd sha256 /d "pdftotext" /t "${{ secrets.PFX_CERTIFICATE_TIMESTAMP_SERVER }}" /v lib/pdftotext/win/pdftotext32.exe
# lib/signtool.exe sign /f emapc.pfx /p "${{ secrets.PFX_CERTIFICATE_PWD }}" /sha1 "${{ secrets.PFX_CERTIFICATE_SHA1 }}" /fd sha256 /d "nssm" /t "${{ secrets.PFX_CERTIFICATE_TIMESTAMP_SERVER }}" /v lib/nssm/nssm32.exe
- name: Setup wix toolset
uses: ./.github/actions/setup-wix-toolset
- id: gitVersion
Expand All @@ -324,8 +324,8 @@ jobs:
run: candle.exe -ext WixUtilExtension -dVersion="${{ steps.gitVersion.outputs.version }}" -arch ${{ matrix.arch }} "WindowsServiceInstaller.wxs" -out WindowsServiceInstaller.wixobj
- name: Link and Bundle wixobj
run: light.exe -ext WixUtilExtension "WindowsServiceInstaller.wixobj" -out emapc-windows-service-installer-${{ matrix.arch }}.msi
- name: Sign installer
run: lib/signtool.exe sign /f emapc.pfx /p "${{ secrets.PFX_CERTIFICATE_PWD }}" /sha1 "${{ secrets.PFX_CERTIFICATE_SHA1 }}" /fd sha256 /d "EinsatzMonitor Alarm PDF Converter" /t "${{ secrets.PFX_CERTIFICATE_TIMESTAMP_SERVER }}" /v emapc-windows-service-installer-${{ matrix.arch }}.msi
# - name: Sign installer
# run: lib/signtool.exe sign /f emapc.pfx /p "${{ secrets.PFX_CERTIFICATE_PWD }}" /sha1 "${{ secrets.PFX_CERTIFICATE_SHA1 }}" /fd sha256 /d "EinsatzMonitor Alarm PDF Converter" /t "${{ secrets.PFX_CERTIFICATE_TIMESTAMP_SERVER }}" /v emapc-windows-service-installer-${{ matrix.arch }}.msi
- name: Upload windows installer
uses: svenstaro/upload-release-action@v2
with:
Expand Down Expand Up @@ -379,7 +379,7 @@ jobs:
runs-on: ubuntu-latest
name: Publish to hecht.space
if: ${{ contains(github.ref, 'main') }}
needs: ["publish","buildLinuxInstaller", "buildWinInstaller"]
needs: ['publish', 'buildLinuxInstaller', 'buildWinInstaller']
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -409,5 +409,4 @@ jobs:
slug: 'emapc'
version: ${{ needs.publish.outputs.tag }}
page: 'README.md'
languages: 'de,en'
assets: 'emapc-windows-service-installer-x64.msi,emapc-windows-service-installer-x86.msi,install-linuxx64.sh,install-linuxx86.sh'
Loading

0 comments on commit 680378b

Please sign in to comment.