Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Revert "Avoid building for testing sign"

Neeraj Gupta4e80c82a6fd7
diff --git a/.github/workflows/auth-win-sign.yml b/.github/workflows/auth-win-sign.yml
index 4a89d61909..432b5764f6 100644
--- a/.github/workflows/auth-win-sign.yml
+++ b/.github/workflows/auth-win-sign.yml
@@ -1,39 +1,99 @@
-name: "Windows Installer Signing Test (auth)"
+name: "Windows build (auth)"
+
+# [Note: Testing release workflows that are triggered by tags]
+#
+# To test this out, push a tag with a pre-release version. The version number
+# should be the version number of the next actual release.
+#
+# > When major, minor, and patch are equal, a pre-release version has lower
+# > precedence than a normal version. Example: 1.0.0-alpha < 1.0.0.
+# > https://semver.org
+#
+# So if the next release we intend to put out is 1.2.3, you can:
+#
+# git tag auth-v1.2.3-test
+# git push origin auth-v1.2.3-test
+#
+# We use a suffix like `-test` to indicate that these are test tags, and that
+# they belong to a pre-release.
+#
+# If you need to do multiple tests, add a .x at the end of the tag. e.g.
+# `auth-v1.2.3-test.1`.
+#
+# Once the testing is done, also delete the tag(s) please.
on:
workflow_dispatch: # Allow manually running the action
+env:
+ FLUTTER_VERSION: "3.24.3"
+
permissions:
contents: write
jobs:
- sign-windows-installer:
+ build-windows:
runs-on: windows-latest
environment: "auth-win-build"
+ defaults:
+ run:
+ working-directory: auth
+
steps:
+ - name: Checkout code and submodules
+ uses: actions/checkout@v4
+ with:
+ submodules: recursive
+
+ - name: Install Flutter ${{ env.FLUTTER_VERSION }}
+ uses: subosito/flutter-action@v2
+ with:
+ channel: "stable"
+ flutter-version: ${{ env.FLUTTER_VERSION }}
+ cache: true
+
- name: Create artifacts directory
- run: mkdir -p artifacts
+ run: mkdir artifacts
- - name: Download Windows installer
+ - name: Build Windows installer
run: |
- curl -L https://github.com/ente-io/ente/releases/download/auth-v4.3.5/ente-auth-v4.3.5-installer.exe -o artifacts/unsigned-installer.exe
+ flutter config --enable-windows-desktop
+ # dart pub global activate flutter_distributor
+ dart pub global activate --source git https://github.com/ente-io/flutter_distributor_fork --git-ref develop --git-path packages/flutter_distributor
+ make innoinstall
+ flutter_distributor package --platform=windows --targets=exe --skip-clean
+ mv dist/**/*-windows-setup.exe artifacts/ente-${{ github.ref_name }}-installer.exe
- - name: Sign installer with Trusted Signing
+ - name: Retain Windows EXE and DLLs
+ run: cp -r build/windows/x64/runner/Release ente-${{ github.ref_name }}-windows
+
+ - name: Sign files with Trusted Signing
uses: azure/trusted-signing-action@v0
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: ${{ secrets.AZURE_ENDPOINT }}
- trusted-signing-account-name: ${{ secrets.AZURE_CODE_SIGNING_NAME }}
+ trusted-signing-account-name: v${{ secrets.AZURE_CODE_SIGNING_NAME }}
certificate-profile-name: ${{ secrets.AZURE_CERT_PROFILE_NAME }}
files: |
- ${{ github.workspace }}/artifacts/unsigned-installer.exe
+ ${{ github.workspace }}/auth/artifacts/ente-${{ github.ref_name }}-installer.exe
+ ${{ github.workspace }}/auth/ente-${{ github.ref_name }}-windows/auth.exe
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
- timestamp-digest: SHA256
-
- - name: Verify signing
- run: |
- powershell -Command "Get-AuthenticodeSignature artifacts/unsigned-installer.exe | Format-List"
\ No newline at end of file
+ timestamp-digest: SHA256
+
+ - name: Zip Windows EXE and DLLs
+ run: tar.exe -a -c -f artifacts/ente-${{ github.ref_name }}-windows.zip ente-${{ github.ref_name }}-windows
+
+ - name: Generate checksums
+ run: sha256sum artifacts/ente-* > artifacts/sha256sum-windows
+
+ - name: Create a draft GitHub release
+ uses: ncipollo/release-action@v1
+ with:
+ artifacts: "auth/artifacts/*"
+ draft: true
+ allowUpdates: true
+ updateOnlyUnreleased: true