mirror of
https://github.com/safing/portmaster
synced 2025-04-17 01:19:09 +00:00
Use real assets in release CI
This commit is contained in:
parent
aa1bd0679c
commit
b3de7da9f7
3 changed files with 27 additions and 33 deletions
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
|
@ -2,6 +2,12 @@ name: Release
|
|||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
paths:
|
||||
- 'desktop/angular/**'
|
||||
branches:
|
||||
- v2.0
|
||||
- feature/new-installer
|
||||
|
||||
jobs:
|
||||
release-prep:
|
||||
|
|
45
Earthfile
45
Earthfile
|
@ -529,45 +529,34 @@ release-prep:
|
|||
COPY (+tauri-build/output/portmaster.exe --target="x86_64-pc-windows-gnu") ./output/binary/windows_amd64/portmaster.exe
|
||||
COPY (+tauri-build/output/WebView2Loader.dll --target="x86_64-pc-windows-gnu") ./output/binary/windows_amd64/WebView2Loader.dll
|
||||
COPY (+go-build/output/portmaster-core.exe --GOARCH=amd64 --GOOS=windows --CMDS=portmaster-core) ./output/binary/windows_amd64/portmaster-core.exe
|
||||
RUN cp dist/windows_amd64/portmaster-kext.sys ./output/binary/windows_amd64/portmaster-kext.sys
|
||||
RUN cp dist/windows_amd64/portmaster-core.dll ./output/binary/windows_amd64/portmaster-core.dll
|
||||
|
||||
# All platforms
|
||||
COPY (+assets/assets.zip) ./output/binary/all/assets.zip
|
||||
COPY (+angular-project/output/portmaster.zip --project=portmaster --dist=./dist --configuration=production --baseHref=/ui/modules/portmaster/) ./output/binary/all/portmaster.zip
|
||||
|
||||
# Intel
|
||||
RUN mkdir -p ./output/intel
|
||||
RUN cp "dist/intel/geoipv4.mmdb.gz" ./output/intel/geoipv4.mmdb.gz
|
||||
RUN cp "dist/intel/geoipv6.mmdb.gz" ./output/intel/geoipv6.mmdb.gz
|
||||
RUN cp "dist/intel/index.dsd" ./output/intel/index.dsd
|
||||
RUN cp "dist/intel/base.dsdl" ./output/intel/base.dsdl
|
||||
RUN cp "dist/intel/intermediate.dsdl" ./output/intel/intermediate.dsdl
|
||||
RUN cp "dist/intel/urgent.dsdl" ./output/intel/urgent.dsdl
|
||||
|
||||
# Genereate index files
|
||||
# Build update manager
|
||||
COPY (+go-build/output/updatemgr --GOARCH=amd64 --GOOS=linux --CMDS=updatemgr) ./updatemgr
|
||||
|
||||
# Get binary artifacts from current release
|
||||
RUN mkdir ./output/download/windows_amd64 && ./updatemgr download https://updates.safing.io/stable.v3.json --platform windows_amd64 ./output/download/windows_amd64
|
||||
|
||||
# Copy required artifacts
|
||||
RUN cp ./output/download/windows_amd64/portmaster-kext.sys ./output/binary/windows_amd64/portmaster-kext.sys
|
||||
RUN cp ./output/download/windows_amd64/portmaster-kext.pdb ./output/binary/windows_amd64/portmaster-kext.pdb
|
||||
RUN cp ./output/download/windows_amd64/portmaster-kext.dll ./output/binary/windows_amd64/portmaster-kext.dll
|
||||
|
||||
# Create new binary index from artifacts
|
||||
RUN ./updatemgr scan --dir "./output/binary" > ./output/binary/index.json
|
||||
RUN ./updatemgr scan --dir "./output/intel" > ./output/intel/index.json
|
||||
|
||||
# Intel Extracted (needed for the installers)
|
||||
RUN mkdir -p ./output/intel_decompressed
|
||||
RUN cp output/intel/index.json ./output/intel_decompressed/index.json
|
||||
|
||||
RUN gzip -dc dist/intel/geoipv4.mmdb.gz > ./output/intel_decompressed/geoipv4.mmdb
|
||||
RUN gzip -dc dist/intel/geoipv6.mmdb.gz > ./output/intel_decompressed/geoipv6.mmdb
|
||||
RUN cp dist/intel/index.dsd ./output/intel_decompressed/index.dsd
|
||||
RUN cp dist/intel/base.dsdl ./output/intel_decompressed/base.dsdl
|
||||
RUN cp dist/intel/intermediate.dsdl ./output/intel_decompressed/intermediate.dsdl
|
||||
RUN cp dist/intel/urgent.dsdl ./output/intel_decompressed/urgent.dsdl
|
||||
|
||||
# Get intel index and assets
|
||||
RUN mkdir ./output/intel && ./updatemgr download https://updates.safing.io/intel.v3.json ./output/intel
|
||||
|
||||
# Save all artifacts to output folder
|
||||
SAVE ARTIFACT --if-exists --keep-ts "output/binary/index.json" AS LOCAL "${outputDir}/binary/index.json"
|
||||
SAVE ARTIFACT --if-exists --keep-ts "output/binary/all/*" AS LOCAL "${outputDir}/binary/all/"
|
||||
SAVE ARTIFACT --if-exists --keep-ts "output/binary/linux_amd64/*" AS LOCAL "${outputDir}/binary/linux_amd64/"
|
||||
SAVE ARTIFACT --if-exists --keep-ts "output/binary/windows_amd64/*" AS LOCAL "${outputDir}/binary/windows_amd64/"
|
||||
# SAVE ARTIFACT --if-exists --keep-ts "output/intel/*" AS LOCAL "${outputDir}/intel/"
|
||||
SAVE ARTIFACT --if-exists --keep-ts "output/intel_decompressed/*" AS LOCAL "${outputDir}/intel_decompressed/"
|
||||
SAVE ARTIFACT --if-exists --keep-ts "output/intel/*" AS LOCAL "${outputDir}/intel/"
|
||||
|
||||
# Save all artifacts to the container output folder so other containers can access it.
|
||||
SAVE ARTIFACT --if-exists --keep-ts "output/binary/index.json" "output/binary/index.json"
|
||||
|
@ -575,7 +564,7 @@ release-prep:
|
|||
SAVE ARTIFACT --if-exists --keep-ts "output/binary/linux_amd64/*" "output/binary/linux_amd64/"
|
||||
SAVE ARTIFACT --if-exists --keep-ts "output/binary/windows_amd64/*" "output/binary/windows_amd64/"
|
||||
SAVE ARTIFACT --if-exists --keep-ts "output/intel/*" "output/intel/"
|
||||
SAVE ARTIFACT --if-exists --keep-ts "output/intel_decompressed/*" "output/intel_decompressed/"
|
||||
SAVE ARTIFACT --if-exists --keep-ts "output/download/*" "output/download/"
|
||||
|
||||
installer-linux:
|
||||
FROM +rust-base
|
||||
|
@ -605,7 +594,7 @@ installer-linux:
|
|||
|
||||
# Download the intel data
|
||||
RUN mkdir -p intel
|
||||
COPY (+release-prep/output/intel_decompressed/*) ./intel/
|
||||
COPY (+release-prep/output/intel/*) ./intel/
|
||||
|
||||
# build the installers
|
||||
RUN cargo tauri bundle --ci --target="${target}"
|
||||
|
|
|
@ -19,11 +19,10 @@ if (-not (Test-Path -Path $binaryDir)) {
|
|||
New-Item -ItemType Directory -Path $binaryDir > $null
|
||||
}
|
||||
|
||||
|
||||
Write-Output "Copying binary files"
|
||||
Copy-Item -Force -Path "dist/binary/index.json" -Destination "$binaryDir/index.json"
|
||||
Copy-Item -Force -Path "dist/binary/windows_amd64/portmaster-core.exe" -Destination "$binaryDir/portmaster-core.exe"
|
||||
Copy-Item -Force -Path "dist/binary/windows_amd64/portmaster-kext.sys" -Destination "$binaryDir/portmaster-kext.sys"
|
||||
Copy-Item -Force -Path "dist/download/windows_amd64/portmaster-core.exe" -Destination "$binaryDir/portmaster-core.exe"
|
||||
Copy-Item -Force -Path "dist/download/windows_amd64/portmaster-kext.sys" -Destination "$binaryDir/portmaster-kext.sys"
|
||||
Copy-Item -Force -Path "dist/download/windows_amd64/portmaster-kext.dll" -Destination "$binaryDir/portmaster-kext.dll"
|
||||
Copy-Item -Force -Path "dist/binary/all/portmaster.zip" -Destination "$binaryDir/portmaster.zip"
|
||||
Copy-Item -Force -Path "dist/binary/all/assets.zip" -Destination "$binaryDir/assets.zip"
|
||||
|
||||
|
@ -39,7 +38,7 @@ if (-not (Test-Path -Path $intelDir)) {
|
|||
}
|
||||
|
||||
Write-Output "Copying intel files"
|
||||
Copy-Item -Force -Path "dist/intel_decompressed/*" -Destination "$intelDir/"
|
||||
Copy-Item -Force -Path "dist/intel/*" -Destination "$intelDir/"
|
||||
|
||||
Set-Location $destinationDir
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue