浏览代码

It'll need to live in the releases repo, reword accordingly

Manav Rathi 1 年之前
父节点
当前提交
3b3d24e9e0
共有 1 个文件被更改,包括 25 次插入11 次删除
  1. 25 11
      desktop/.github/workflows/desktop-release.yml

+ 25 - 11
.github/workflows/desktop-release.yml → desktop/.github/workflows/desktop-release.yml

@@ -1,17 +1,26 @@
-name: "Release (photos desktop)"
+name: "Release"
 
 # This will create a new draft release with public artifacts.
 #
 # Note that a release will only get created if there is an associated tag
 # (GitHub releases need a corresponding tag).
+#
+# The canonical source for this action is in the repository where we keep the
+# source code for the Ente Photos desktop app: https://github.com/ente-io/ente
+#
+# However, it actually lives and runs in the repository that we use for making
+# releases: https://github.com/ente-io/photos-desktop
+#
+# We need two repositories because Electron updater currently doesn't work well
+# with monorepos. For more details, see `docs/release.md`.
 
 on:
-    workflow_dispatch: # Allow manually running the action
     push:
-        # Run when a tag matching the pattern "photosd-v*"" is pushed
-        # See: [Note: Testing release workflows that are triggered by tags]
+        # Run when a tag matching the pattern "v*"" is pushed.
+        #
+        # See: [Note: Testing release workflows that are triggered by tags].
         tags:
-            - "photosd-v*"
+            - "v*"
 
 jobs:
     release:
@@ -29,6 +38,11 @@ jobs:
             - name: Checkout code
               uses: actions/checkout@v4
               with:
+                  # Checkout the tag photosd-v1.x.x from the source code
+                  # repository when we're invoked for tag v1.x.x on the releases
+                  # repository.
+                  repository: ente-io/ente
+                  ref: photosd-${{ github.ref }}
                   submodules: recursive
 
             - name: Setup node
@@ -44,7 +58,7 @@ jobs:
               # Import Apple API key for app notarization on macOS
               run: |
                   mkdir -p ~/private_keys/
-                  echo '${{ secrets.APPLE_API_KEY }}' > ~/private_keys/AuthKey_${{ secrets.APPLE_API_KEY_ID }}.p8
+                  echo '${{ secrets.API_KEY }}' > ~/private_keys/AuthKey_${{ secrets.API_KEY_ID }}.p8
 
             - name: Install libarchive-tools for pacman build
               if: startsWith(matrix.os, 'ubuntu')
@@ -60,13 +74,13 @@ jobs:
                   github_token: ${{ secrets.GITHUB_TOKEN }}
 
                   # If the commit is tagged with a version (e.g. "v1.0.0"),
-                  # release the app after building
+                  # release the app after building.
                   release: ${{ startsWith(github.ref, 'refs/tags/v') }}
 
-                  mac_certs: ${{ secrets.MAC_OS_CERTIFICATE }}
-                  mac_certs_password: ${{ secrets.MAC_OS_CERTIFICATE_PASSWORD }}
+                  mac_certs: ${{ secrets.MAC_CERTS }}
+                  mac_certs_password: ${{ secrets.MAC_CERTS_PASSWORD }}
               env:
                   # macOS notarization API key details
-                  API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}
-                  API_KEY_ISSUER_ID: ${{ secrets.APPLE_API_KEY_ISSUER_ID }}
+                  API_KEY_ID: ${{ secrets.API_KEY_ID }}
+                  API_KEY_ISSUER_ID: ${{ secrets.API_KEY_ISSUER_ID }}
                   USE_HARD_LINKS: false