mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-11-04 15:11:31 +08:00 
			
		
		
		
	chore(ci): customize shell per platform
This commit is contained in:
		
							parent
							
								
									9aaada3f6e
								
							
						
					
					
						commit
						d942daea94
					
				
							
								
								
									
										19
									
								
								.github/actions/build-electron/action.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										19
									
								
								.github/actions/build-electron/action.yml
									
									
									
									
										vendored
									
									
								
							@ -11,6 +11,9 @@ inputs:
 | 
				
			|||||||
  extension:
 | 
					  extension:
 | 
				
			||||||
    description: "Platform specific extensions to copy in the output: dmg, deb, rpm, exe, zip"
 | 
					    description: "Platform specific extensions to copy in the output: dmg, deb, rpm, exe, zip"
 | 
				
			||||||
    required: true
 | 
					    required: true
 | 
				
			||||||
 | 
					  shell:
 | 
				
			||||||
 | 
					    description: "Which shell to use"
 | 
				
			||||||
 | 
					    required: true
 | 
				
			||||||
  forge_platform:
 | 
					  forge_platform:
 | 
				
			||||||
    required: true
 | 
					    required: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -40,21 +43,21 @@ runs:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    - name: Verify certificates
 | 
					    - name: Verify certificates
 | 
				
			||||||
      if: inputs.os == 'macos'
 | 
					      if: inputs.os == 'macos'
 | 
				
			||||||
      shell: cmd
 | 
					      shell: ${{ inputs.shell }}
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        echo "Available signing identities:"
 | 
					        echo "Available signing identities:"
 | 
				
			||||||
        security find-identity -v -p codesigning build.keychain
 | 
					        security find-identity -v -p codesigning build.keychain
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Set up Python and other macOS dependencies
 | 
					    - name: Set up Python and other macOS dependencies
 | 
				
			||||||
      if: ${{ inputs.os == 'macos' }}
 | 
					      if: ${{ inputs.os == 'macos' }}
 | 
				
			||||||
      shell: cmd
 | 
					      shell: ${{ inputs.shell }}
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        brew install python-setuptools
 | 
					        brew install python-setuptools
 | 
				
			||||||
        brew install create-dmg
 | 
					        brew install create-dmg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Install dependencies for RPM and Flatpak package building
 | 
					    - name: Install dependencies for RPM and Flatpak package building
 | 
				
			||||||
      if: ${{ inputs.os == 'linux' }}
 | 
					      if: ${{ inputs.os == 'linux' }}
 | 
				
			||||||
      shell: cmd
 | 
					      shell: ${{ inputs.shell }}
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        sudo apt-get update && sudo apt-get install rpm flatpak-builder elfutils
 | 
					        sudo apt-get update && sudo apt-get install rpm flatpak-builder elfutils
 | 
				
			||||||
        flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
 | 
					        flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
 | 
				
			||||||
@ -64,16 +67,16 @@ runs:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    # Build setup
 | 
					    # Build setup
 | 
				
			||||||
    - name: Install dependencies
 | 
					    - name: Install dependencies
 | 
				
			||||||
      shell: cmd
 | 
					      shell: ${{ inputs.shell }}
 | 
				
			||||||
      run: npm ci
 | 
					      run: npm ci
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Update build info
 | 
					    - name: Update build info
 | 
				
			||||||
      shell: cmd
 | 
					      shell: ${{ inputs.shell }}
 | 
				
			||||||
      run: npm run chore:update-build-info
 | 
					      run: npm run chore:update-build-info
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Critical debugging configuration
 | 
					    # Critical debugging configuration
 | 
				
			||||||
    - name: Run electron-forge build with enhanced logging
 | 
					    - name: Run electron-forge build with enhanced logging
 | 
				
			||||||
      shell: cmd
 | 
					      shell: ${{ inputs.shell }}
 | 
				
			||||||
      env:
 | 
					      env:
 | 
				
			||||||
        # Pass through required environment variables for signing and notarization
 | 
					        # Pass through required environment variables for signing and notarization
 | 
				
			||||||
        APPLE_TEAM_ID: ${{ env.APPLE_TEAM_ID }}
 | 
					        APPLE_TEAM_ID: ${{ env.APPLE_TEAM_ID }}
 | 
				
			||||||
@ -88,7 +91,7 @@ runs:
 | 
				
			|||||||
    # Add DMG signing step
 | 
					    # Add DMG signing step
 | 
				
			||||||
    - name: Sign DMG
 | 
					    - name: Sign DMG
 | 
				
			||||||
      if: inputs.os == 'macos'
 | 
					      if: inputs.os == 'macos'
 | 
				
			||||||
      shell: cmd
 | 
					      shell: ${{ inputs.shell }}
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        echo "Signing DMG file..."
 | 
					        echo "Signing DMG file..."
 | 
				
			||||||
        dmg_file=$(find ./dist -name "*.dmg" -print -quit)
 | 
					        dmg_file=$(find ./dist -name "*.dmg" -print -quit)
 | 
				
			||||||
@ -113,7 +116,7 @@ runs:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    - name: Verify code signing
 | 
					    - name: Verify code signing
 | 
				
			||||||
      if: inputs.os == 'macos'
 | 
					      if: inputs.os == 'macos'
 | 
				
			||||||
      shell: cmd
 | 
					      shell: ${{ inputs.shell }}
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        echo "Verifying code signing for all artifacts..."
 | 
					        echo "Verifying code signing for all artifacts..."
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										4
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/main.yml
									
									
									
									
										vendored
									
									
								
							@ -24,12 +24,15 @@ jobs:
 | 
				
			|||||||
          - name: macos
 | 
					          - name: macos
 | 
				
			||||||
            image: macos-latest
 | 
					            image: macos-latest
 | 
				
			||||||
            extension: [dmg, zip]
 | 
					            extension: [dmg, zip]
 | 
				
			||||||
 | 
					            shell: bash
 | 
				
			||||||
          - name: linux
 | 
					          - name: linux
 | 
				
			||||||
            image: ubuntu-latest
 | 
					            image: ubuntu-latest
 | 
				
			||||||
            extension: [deb, rpm, zip, flatpak]
 | 
					            extension: [deb, rpm, zip, flatpak]
 | 
				
			||||||
 | 
					            shell: bash
 | 
				
			||||||
          - name: windows
 | 
					          - name: windows
 | 
				
			||||||
            image: windows-latest
 | 
					            image: windows-latest
 | 
				
			||||||
            extension: [exe, zip]
 | 
					            extension: [exe, zip]
 | 
				
			||||||
 | 
					            shell: cmd
 | 
				
			||||||
    runs-on: ${{ matrix.os.image }}
 | 
					    runs-on: ${{ matrix.os.image }}
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v4
 | 
					      - uses: actions/checkout@v4
 | 
				
			||||||
@ -43,6 +46,7 @@ jobs:
 | 
				
			|||||||
          os: ${{ matrix.os.name }}
 | 
					          os: ${{ matrix.os.name }}
 | 
				
			||||||
          arch: ${{ matrix.arch }}
 | 
					          arch: ${{ matrix.arch }}
 | 
				
			||||||
          extension: ${{ matrix.os.extension }}
 | 
					          extension: ${{ matrix.os.extension }}
 | 
				
			||||||
 | 
					          shell: ${{ matrix.os.shell }}
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
          APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
 | 
					          APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
 | 
				
			||||||
          APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
 | 
					          APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										2
									
								
								.github/workflows/nightly.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/nightly.yml
									
									
									
									
										vendored
									
									
								
							@ -25,6 +25,7 @@ jobs:
 | 
				
			|||||||
            image: win-signing
 | 
					            image: win-signing
 | 
				
			||||||
            extension: [exe, zip]
 | 
					            extension: [exe, zip]
 | 
				
			||||||
            forge_platform: win32
 | 
					            forge_platform: win32
 | 
				
			||||||
 | 
					            shell: cmd
 | 
				
			||||||
    runs-on: ${{ matrix.os.image }}
 | 
					    runs-on: ${{ matrix.os.image }}
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v4
 | 
					      - uses: actions/checkout@v4
 | 
				
			||||||
@ -42,6 +43,7 @@ jobs:
 | 
				
			|||||||
          os: ${{ matrix.os.name }}
 | 
					          os: ${{ matrix.os.name }}
 | 
				
			||||||
          arch: ${{ matrix.arch }}
 | 
					          arch: ${{ matrix.arch }}
 | 
				
			||||||
          extension: ${{ join(matrix.os.extension, ' ') }}
 | 
					          extension: ${{ join(matrix.os.extension, ' ') }}
 | 
				
			||||||
 | 
					          shell: ${{ matrix.os.shell }}
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
          APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
 | 
					          APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
 | 
				
			||||||
          APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
 | 
					          APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										4
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/release.yml
									
									
									
									
										vendored
									
									
								
							@ -21,12 +21,15 @@ jobs:
 | 
				
			|||||||
          - name: macos
 | 
					          - name: macos
 | 
				
			||||||
            image: macos-latest
 | 
					            image: macos-latest
 | 
				
			||||||
            extension: [dmg, zip]
 | 
					            extension: [dmg, zip]
 | 
				
			||||||
 | 
					            shell: bash
 | 
				
			||||||
          - name: linux
 | 
					          - name: linux
 | 
				
			||||||
            image: ubuntu-latest
 | 
					            image: ubuntu-latest
 | 
				
			||||||
            extension: [deb, rpm, zip, flatpak]
 | 
					            extension: [deb, rpm, zip, flatpak]
 | 
				
			||||||
 | 
					            shell: bash
 | 
				
			||||||
          - name: windows
 | 
					          - name: windows
 | 
				
			||||||
            image: windows-latest
 | 
					            image: windows-latest
 | 
				
			||||||
            extension: [exe, zip]
 | 
					            extension: [exe, zip]
 | 
				
			||||||
 | 
					            shell: cmd
 | 
				
			||||||
    runs-on: ${{ matrix.os.image }}
 | 
					    runs-on: ${{ matrix.os.image }}
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - uses: actions/checkout@v4
 | 
					      - uses: actions/checkout@v4
 | 
				
			||||||
@ -40,6 +43,7 @@ jobs:
 | 
				
			|||||||
          os: ${{ matrix.os.name }}
 | 
					          os: ${{ matrix.os.name }}
 | 
				
			||||||
          arch: ${{ matrix.arch }}
 | 
					          arch: ${{ matrix.arch }}
 | 
				
			||||||
          extension: ${{ join(matrix.os.extension, ' ') }}
 | 
					          extension: ${{ join(matrix.os.extension, ' ') }}
 | 
				
			||||||
 | 
					          shell: ${{ matrix.os.shell }}
 | 
				
			||||||
        env:
 | 
					        env:
 | 
				
			||||||
          APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
 | 
					          APPLE_APP_CERTIFICATE_BASE64: ${{ secrets.APPLE_APP_CERTIFICATE_BASE64 }}
 | 
				
			||||||
          APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
 | 
					          APPLE_APP_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_APP_CERTIFICATE_PASSWORD }}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user