Skip to content

Commit

Permalink
build: zip build dir as artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
ryan-andrew committed Jan 3, 2025
1 parent 8d5e447 commit 9b15920
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@ jobs:
- name: Define Artifact Paths
id: define-artifact-paths
run: |
$archive="build/windows/x64/runner/Release/"
$installer="build/windows/x64/runner/Installer/Android Sideloader-${{ github.ref_name }}-Windows-Installer.exe"
$build="build/windows/x64/runner/Release/"
$archiveName="AndroidSideloader-${{ github.ref_name }}-Windows-Portable.zip"
$archive="build/windows/x64/runner/$archiveName"
$installerName="AndroidSideloader-${{ github.ref_name }}-Windows-Installer.exe"
$installer="build/windows/x64/runner/Installer/$installerName"
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
- name: Extract Release Notes
Expand Down Expand Up @@ -52,16 +58,20 @@ jobs:
path: installer.iss
options: /O+ /DMyAppVersion="${{ github.ref_name }}"

- name: Compress Build Directory
run: |
Compress-Archive -Path "${{ env.BUILD_DIR_PATH }}\*" -DestinationPath "${{ env.ARCHIVE_PATH }}"
- name: Upload Build Files
uses: actions/upload-artifact@v4
with:
name: AndroidSideloader-${{ github.ref_name }}-Windows-Portable
name: ${{ env.ARCHIVE_NAME }}
path: ${{ env.ARCHIVE_PATH }}

- name: Upload Installer Executable as Artifact
uses: actions/upload-artifact@v4
with:
name: AndroidSideloader-${{ github.ref_name }}-Windows-Installer.exe
name: ${{ env.INSTALLER_NAME }}
path: ${{ env.INSTALLER_PATH }}

- name: Create GitHub Release
Expand All @@ -74,4 +84,4 @@ jobs:
draft: true
prerelease: true
artifactErrorsFailBuild: true
artifacts: "${{ env.ARCHIVE_PATH }}/**,${{ env.INSTALLER_PATH }}"
artifacts: "${{ env.ARCHIVE_PATH }},${{ env.INSTALLER_PATH }}"

0 comments on commit 9b15920

Please sign in to comment.