action.yml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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. if [[ '${{ inputs.codesign }}' == 'true' ]] package_args+=(-s)
  60. if [[ '${{ inputs.notarize }}' == 'true' ]] package_args+=(-n)
  61. ${{ inputs.workingDirectory }}/.github/scripts/package-macos.zsh ${package_args}
  62. - name: Run Linux packaging
  63. if: ${{ runner.os == 'Linux' }}
  64. shell: bash
  65. run: |
  66. package_args=(
  67. -c ${{ inputs.config }}
  68. -t linux-${{ inputs.target }}
  69. )
  70. ${{ inputs.workingDirectory }}/.github/scripts/package-linux.sh ${package_args[@]}
  71. - name: Run Windows packaging
  72. if: ${{ runner.os == 'Windows' }}
  73. shell: pwsh
  74. run: |
  75. $PackageArgs = @{
  76. Target = '${{ inputs.target }}'
  77. Configuration = '${{ inputs.config }}'
  78. }
  79. if ( '${{ inputs.createInstaller }}' -eq 'true' ) {
  80. $PackageArgs += @{BuildInstaller = $true}
  81. }
  82. ${{ inputs.workingDirectory }}/.github/scripts/Package-Windows.ps1 @PackageArgs