Skip to content

Commit

Permalink
build: put all artifacts into one directory
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-andrew committed Jan 3, 2025
1 parent 54ae3b0 commit 28db28c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 22 deletions.
35 changes: 14 additions & 21 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,30 @@ on:
jobs:
build-windows:
runs-on: windows-latest
env:
RUNNER_PATH: build/windows/x64/runner
ARTIFACT_PATH: ${{ env.RUNNER_PATH }}/Artifacts
BUILD_DIR_PATH: ${{ env.RUNNER_PATH }}/Release/
ARCHIVE_NAME: AndroidSideloader-${{ github.ref_name }}-Windows-Portable.zip
ARCHIVE_PATH: ${{ env.ARTIFACT_PATH }}/${{ env.ARCHIVE_NAME }}
INSTALLER_NAME: AndroidSideloader-${{ github.ref_name }}-Windows-Installer.exe
INSTALLER_PATH: ${{ env.ARTIFACT_PATH }}/${{ env.INSTALLER_NAME }}
PACKAGE_NAME: AndroidSideloader-${{ github.ref_name }}.exe
PACKAGE_PATH: ${{ env.ARTIFACT_PATH }}/AndroidSideloader-${{ github.ref_name }}.exe
permissions:
contents: write
name: Build Flutter App Windows
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Define Artifact Paths
id: define-artifact-paths
run: |
$runner="build/windows/x64/runner"
$build="$runner/Release/"
$archiveName="AndroidSideloader-${{ github.ref_name }}-Windows-Portable.zip"
$archive="$runner/$archiveName"
$installerName="AndroidSideloader-${{ github.ref_name }}-Windows-Installer.exe"
$installer="$runner/Installer/$installerName"
$packageName="AndroidSideloader-${{ github.ref_name }}.exe"
echo "BUILD_DIR_PATH=$build" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "ARCHIVE_NAME=$archiveName" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "ARCHIVE_PATH=$archive" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "INSTALLER_NAME=$installerName" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "INSTALLER_PATH=$installer" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "PACKAGE_NAME=packageName" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Extract Release Notes
id: extract_changelog
run: |
$ReleaseNotes = & "scripts/get-release-notes.ps1" -VersionName ${{ github.ref_name }}
if ($LASTEXITCODE -ne 0) {
Write-Output "$ReleaseNotes"
exit 1
if ($LASTEXITCODE -ne 0 -or -not (Test-Path ./ReleaseNotes.md)) {
Write-Error "Failed to create ReleaseNotes.md"
exit 1
}
$ReleaseNotes | Out-File -FilePath "./ReleaseNotes.md" -Encoding utf8
Expand Down Expand Up @@ -70,7 +63,7 @@ jobs:

- name: Create enigma package
run: |
& '${{ env.ENIGMA }}' .\package.evb -output ${{ env.PACKAGE_NAME }}
& '${{ env.ENIGMA }}' .\package.evb -output ".\${{ env.PACKAGE_PATH }}"
- name: Compress Build Directory
run: |
Expand Down
2 changes: 1 addition & 1 deletion installer.iss
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LicenseFile=LICENSE
; Remove the following line to run in administrative install mode (install for all users.)
PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputDir=build\windows\x64\runner\Installer
OutputDir=build\windows\x64\runner\Artifacts
OutputBaseFilename={#StringChange(MyAppName, " ", "")}-{#MyAppVersion}-Windows-Installer
SetupIconFile=assets\icon.ico
Compression=lzma
Expand Down

0 comments on commit 28db28c

Please sign in to comment.