|
| 1 | +name: 'Package plugin' |
| 2 | +description: 'Packages the plugin for specified architecture and build config.' |
| 3 | +inputs: |
| 4 | + target: |
| 5 | + description: 'Build target for dependencies' |
| 6 | + required: true |
| 7 | + config: |
| 8 | + description: 'Build configuration' |
| 9 | + required: false |
| 10 | + default: 'Release' |
| 11 | + codesign: |
| 12 | + description: 'Enable codesigning (macOS only)' |
| 13 | + required: false |
| 14 | + default: 'false' |
| 15 | + notarize: |
| 16 | + description: 'Enable notarization (macOS only)' |
| 17 | + required: false |
| 18 | + default: 'false' |
| 19 | + codesignIdent: |
| 20 | + description: 'Developer ID for application codesigning (macOS only)' |
| 21 | + required: false |
| 22 | + default: '-' |
| 23 | + installerIdent: |
| 24 | + description: 'Developer ID for installer package codesigning (macOS only)' |
| 25 | + required: false |
| 26 | + default: '' |
| 27 | + codesignUser: |
| 28 | + description: 'Apple ID username for notarization (macOS only)' |
| 29 | + required: false |
| 30 | + default: '' |
| 31 | + codesignPass: |
| 32 | + description: 'Apple ID password for notarization (macOS only)' |
| 33 | + required: false |
| 34 | + default: '' |
| 35 | + createInstaller: |
| 36 | + description: 'Create InnoSetup installer (Windows only)' |
| 37 | + required: false |
| 38 | + default: 'false' |
| 39 | + workingDirectory: |
| 40 | + description: 'Working directory for packaging' |
| 41 | + required: false |
| 42 | + default: ${{ github.workspace }} |
| 43 | +runs: |
| 44 | + using: 'composite' |
| 45 | + steps: |
| 46 | + - name: Run macOS packaging |
| 47 | + if: ${{ runner.os == 'macOS' }} |
| 48 | + shell: zsh {0} |
| 49 | + env: |
| 50 | + CODESIGN_IDENT: ${{ inputs.codesignIdent }} |
| 51 | + CODESIGN_IDENT_INSTALLER: ${{ inputs.installerIdent }} |
| 52 | + CODESIGN_IDENT_USER: ${{ inputs.codesignUser }} |
| 53 | + CODESIGN_IDENT_PASS: ${{ inputs.codesignPass }} |
| 54 | + run: | |
| 55 | + package_args=( |
| 56 | + -c ${{ inputs.config }} |
| 57 | + -t macos-${{ inputs.target }} |
| 58 | + ) |
| 59 | +
|
| 60 | + if [[ '${{ inputs.codesign }}' == 'true' ]] package_args+=(-s) |
| 61 | + if [[ '${{ inputs.notarize }}' == 'true' ]] package_args+=(-n) |
| 62 | + if (( ${+CI} && ${+RUNNER_DEBUG} )) build_args+=(--debug) |
| 63 | +
|
| 64 | + ${{ inputs.workingDirectory }}/.github/scripts/package-macos.zsh ${package_args} |
| 65 | +
|
| 66 | + - name: Run Linux packaging |
| 67 | + if: ${{ runner.os == 'Linux' }} |
| 68 | + shell: bash |
| 69 | + run: | |
| 70 | + package_args=( |
| 71 | + -c ${{ inputs.config }} |
| 72 | + -t linux-${{ inputs.target }} |
| 73 | + ) |
| 74 | + if [[ -n "${CI}" && -n "${RUNNER_DEBUG}" ]]; then |
| 75 | + build_args+=(--debug) |
| 76 | + fi |
| 77 | +
|
| 78 | + ${{ inputs.workingDirectory }}/.github/scripts/package-linux.sh "${package_args[@]}" |
| 79 | +
|
| 80 | + - name: Run Windows packaging |
| 81 | + if: ${{ runner.os == 'Windows' }} |
| 82 | + shell: pwsh |
| 83 | + run: | |
| 84 | + $PackageArgs = @{ |
| 85 | + Target = '${{ inputs.target }}' |
| 86 | + Configuration = '${{ inputs.config }}' |
| 87 | + } |
| 88 | +
|
| 89 | + if ( '${{ inputs.createInstaller }}' -eq 'true' ) { |
| 90 | + $PackageArgs += @{BuildInstaller = $true} |
| 91 | + } |
| 92 | +
|
| 93 | + if ( ( Test-Path env:CI ) -and ( Test-Path env:RUNNER_DEBUG ) ) { |
| 94 | + $BuildArgs += @{ |
| 95 | + Debug = $true |
| 96 | + } |
| 97 | + } |
| 98 | +
|
| 99 | + ${{ inputs.workingDirectory }}/.github/scripts/Package-Windows.ps1 @PackageArgs |
0 commit comments