-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/YBTopaz8/Dimmer-MAUI
- Loading branch information
Showing
5 changed files
with
296 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
name: Build and Release Dimmer | ||
|
||
on: | ||
release: | ||
types: [published] | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-windows: | ||
name: Build and Package Windows Installer | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 9.0 | ||
|
||
- name: Publish Windows Build | ||
run: dotnet publish Dimmer-MAUI.csproj \ | ||
-f net9.0-windows10.0.19041.0 -c Release -r win-x64 \ | ||
--self-contained=false -p:WindowsPackageType=None \ | ||
-o ./windows-output | ||
|
||
- name: Install Inno Setup | ||
uses: jrsoftware/issrc-action@v1 | ||
with: | ||
inno-setup-version: latest # or specify a version | ||
|
||
- name: Package with Inno Setup | ||
run: | | ||
# Pass the Windows output directory as a define and explicitly set the output directory | ||
ISCC.exe /dMySourceDir=./windows-output /o./Output ./releasePackaging/setup_dimmer.iss | ||
- name: Verify Installer Exists | ||
run: | | ||
if [ ! -f "./Output/Setup_Dimmer.exe" ]; then | ||
echo "Inno Setup did not create the installer file." | ||
exit 1 | ||
else | ||
echo "Installer file found: ./Output/Setup_Dimmer.exe" | ||
fi | ||
- name: Upload Windows Installer Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dimmer-windows-installer | ||
path: ./Output/Setup_Dimmer.exe | ||
|
||
# build-android: | ||
# name: Build Android APK | ||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - name: Checkout Repository | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Setup .NET | ||
# uses: actions/setup-dotnet@v3 | ||
# with: | ||
# dotnet-version: 9.0 | ||
|
||
# - name: Restore NuGet packages | ||
# run: dotnet restore Dimmer-MAUI.csproj | ||
|
||
# - name: Build Android APK | ||
# run: dotnet publish Dimmer-MAUI.csproj -f net9.0-android -c Release /p:AndroidKeyStorePath=${{ secrets.KEYSTORE_PATH }} /p:AndroidKeyStorePassword=${{ secrets.KEYSTORE_PASSWORD }} /p:AndroidKeyAlias=${{ secrets.KEYSTORE_ALIAS }} /p:AndroidKeyPassword=${{ secrets.KEY_PASSWORD }} -o ./android-output | ||
|
||
# - name: Sign APK (using apksigner) | ||
# run: | | ||
# apk_path=$(find ./android-output -name "*.apk") | ||
# apksigner sign --ks ${{ secrets.KEYSTORE_PATH }} --ks-pass pass:"${{ secrets.KEYSTORE_PASSWORD }}" --key-pass pass:"${{ secrets.KEY_PASSWORD }}" --ks-key-alias "${{ secrets.KEYSTORE_ALIAS }}" --out ./android-output/Dimmer-Signed.apk $apk_path | ||
|
||
# - name: Align APK | ||
# run: | | ||
# aligned_apk_path="./android-output/Dimmer-Aligned.apk" | ||
# unsigned_apk_path=$(find ./android-output -name "*.apk" ! -name "*-Aligned.apk" ! -name "*-Signed.apk") | ||
# zipalign -v 4 "$unsigned_apk_path" "$aligned_apk_path" | ||
|
||
# - name: Upload Android APK Artifact | ||
# uses: actions/upload-artifact@v3 | ||
# with: | ||
# name: dimmer-android-apk | ||
# path: ./android-output/Dimmer-Aligned.apk | ||
|
||
release: | ||
name: Create GitHub Release | ||
needs: [build-windows] # Only needs the Windows build for now | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download Windows Installer Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dimmer-windows-installer | ||
path: ./release-assets/windows | ||
|
||
# - name: Download Android APK Artifact | ||
# uses: actions/download-artifact@v3 | ||
# with: | ||
# name: dimmer-android-apk | ||
# path: ./release-assets/android | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.event.release.tag_name }} | ||
release_name: ${{ github.event.release.name }} | ||
body_path: .github/release-notes.md # Optional: Create a release notes file | ||
draft: false | ||
prerelease: ${{ github.event.release.prerelease }} | ||
|
||
- name: Upload Windows Installer to Release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./release-assets/windows/Setup_Dimmer.exe | ||
asset_name: Setup_Dimmer.exe | ||
asset_content_type: application/x-msdownload | ||
|
||
# - name: Upload Android APK to Release | ||
# uses: actions/upload-release-asset@v1 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
# asset_path: ./release-assets/android/Dimmer-Aligned.apk | ||
# asset_name: Dimmer.apk | ||
# asset_content_type: application/vnd.android.package-archive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
name: Build and Release Dimmer | ||
|
||
on: | ||
release: | ||
types: [published] | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-windows: | ||
name: Build and Package Windows Installer | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 9.0 | ||
|
||
- name: Publish Windows Build | ||
run: dotnet publish Dimmer-MAUI.csproj \ | ||
-f net9.0-windows10.0.19041.0 -c Release -r win-x64 \ | ||
--self-contained=false -p:WindowsPackageType=None \ | ||
-o ./windows-output | ||
|
||
- name: Install Inno Setup | ||
uses: jrsoftware/issrc-action@v1 | ||
with: | ||
inno-setup-version: latest # or specify a version | ||
|
||
- name: Package with Inno Setup | ||
run: | | ||
# Pass the Windows output directory as a define and explicitly set the output directory | ||
ISCC.exe /dMySourceDir=./windows-output /o./Output ./releasePackaging/setup_dimmer.iss | ||
- name: Verify Installer Exists | ||
run: | | ||
if [ ! -f "./Output/Setup_Dimmer.exe" ]; then | ||
echo "Inno Setup did not create the installer file." | ||
exit 1 | ||
else | ||
echo "Installer file found: ./Output/Setup_Dimmer.exe" | ||
fi | ||
- name: Upload Windows Installer Artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: dimmer-windows-installer | ||
path: ./Output/Setup_Dimmer.exe | ||
|
||
# build-android: | ||
# name: Build Android APK | ||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - name: Checkout Repository | ||
# uses: actions/checkout@v3 | ||
|
||
# - name: Setup .NET | ||
# uses: actions/setup-dotnet@v3 | ||
# with: | ||
# dotnet-version: 9.0 | ||
|
||
# - name: Restore NuGet packages | ||
# run: dotnet restore Dimmer-MAUI.csproj | ||
|
||
# - name: Build Android APK | ||
# run: dotnet publish Dimmer-MAUI.csproj -f net9.0-android -c Release /p:AndroidKeyStorePath=${{ secrets.KEYSTORE_PATH }} /p:AndroidKeyStorePassword=${{ secrets.KEYSTORE_PASSWORD }} /p:AndroidKeyAlias=${{ secrets.KEYSTORE_ALIAS }} /p:AndroidKeyPassword=${{ secrets.KEY_PASSWORD }} -o ./android-output | ||
|
||
# - name: Sign APK (using apksigner) | ||
# run: | | ||
# apk_path=$(find ./android-output -name "*.apk") | ||
# apksigner sign --ks ${{ secrets.KEYSTORE_PATH }} --ks-pass pass:"${{ secrets.KEYSTORE_PASSWORD }}" --key-pass pass:"${{ secrets.KEY_PASSWORD }}" --ks-key-alias "${{ secrets.KEYSTORE_ALIAS }}" --out ./android-output/Dimmer-Signed.apk $apk_path | ||
|
||
# - name: Align APK | ||
# run: | | ||
# aligned_apk_path="./android-output/Dimmer-Aligned.apk" | ||
# unsigned_apk_path=$(find ./android-output -name "*.apk" ! -name "*-Aligned.apk" ! -name "*-Signed.apk") | ||
# zipalign -v 4 "$unsigned_apk_path" "$aligned_apk_path" | ||
|
||
# - name: Upload Android APK Artifact | ||
# uses: actions/upload-artifact@v3 | ||
# with: | ||
# name: dimmer-android-apk | ||
# path: ./android-output/Dimmer-Aligned.apk | ||
|
||
release: | ||
name: Create GitHub Release | ||
needs: [build-windows] # Only needs the Windows build for now | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Download Windows Installer Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: dimmer-windows-installer | ||
path: ./release-assets/windows | ||
|
||
# - name: Download Android APK Artifact | ||
# uses: actions/download-artifact@v3 | ||
# with: | ||
# name: dimmer-android-apk | ||
# path: ./release-assets/android | ||
|
||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.event.release.tag_name }} | ||
release_name: ${{ github.event.release.name }} | ||
body_path: .github/release-notes.md # Optional: Create a release notes file | ||
draft: false | ||
prerelease: ${{ github.event.release.prerelease }} | ||
|
||
- name: Upload Windows Installer to Release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
asset_path: ./release-assets/windows/Setup_Dimmer.exe | ||
asset_name: Setup_Dimmer.exe | ||
asset_content_type: application/x-msdownload | ||
|
||
# - name: Upload Android APK to Release | ||
# uses: actions/upload-release-asset@v1 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
# asset_path: ./release-assets/android/Dimmer-Aligned.apk | ||
# asset_name: Dimmer.apk | ||
# asset_content_type: application/vnd.android.package-archive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: Test Workflow | ||
on: push | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Echo a message | ||
run: echo "Test workflow triggered!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters