File: action.yml

package info (click to toggle)
obs-gradient-source 0.3.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 440 kB
  • sloc: ansic: 425; makefile: 22; cpp: 16
file content (99 lines) | stat: -rw-r--r-- 3,020 bytes parent folder | download | duplicates (40)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: 'Package plugin'
description: 'Packages the plugin for specified architecture and build config.'
inputs:
  target:
    description: 'Build target for dependencies'
    required: true
  config:
    description: 'Build configuration'
    required: false
    default: 'Release'
  codesign:
    description: 'Enable codesigning (macOS only)'
    required: false
    default: 'false'
  notarize:
    description: 'Enable notarization (macOS only)'
    required: false
    default: 'false'
  codesignIdent:
    description: 'Developer ID for application codesigning (macOS only)'
    required: false
    default: '-'
  installerIdent:
    description: 'Developer ID for installer package codesigning (macOS only)'
    required: false
    default: ''
  codesignUser:
    description: 'Apple ID username for notarization (macOS only)'
    required: false
    default: ''
  codesignPass:
    description: 'Apple ID password for notarization (macOS only)'
    required: false
    default: ''
  createInstaller:
    description: 'Create InnoSetup installer (Windows only)'
    required: false
    default: 'false'
  workingDirectory:
    description: 'Working directory for packaging'
    required: false
    default: ${{ github.workspace }}
runs:
  using: 'composite'
  steps:
    - name: Run macOS packaging
      if: ${{ runner.os == 'macOS' }}
      shell: zsh {0}
      env:
        CODESIGN_IDENT: ${{ inputs.codesignIdent }}
        CODESIGN_IDENT_INSTALLER: ${{ inputs.installerIdent }}
        CODESIGN_IDENT_USER: ${{ inputs.codesignUser }}
        CODESIGN_IDENT_PASS: ${{ inputs.codesignPass }}
      run: |
        package_args=(
          -c ${{ inputs.config }}
          -t macos-${{ inputs.target }}
        )

        if [[ '${{ inputs.codesign }}' == 'true' ]] package_args+=(-s)
        if [[ '${{ inputs.notarize }}' == 'true' ]] package_args+=(-n)
        if (( ${+CI} && ${+RUNNER_DEBUG} )) build_args+=(--debug)

        ${{ inputs.workingDirectory }}/.github/scripts/package-macos.zsh ${package_args}

    - name: Run Linux packaging
      if: ${{ runner.os == 'Linux' }}
      shell: bash
      run: |
        package_args=(
          -c ${{ inputs.config }}
          -t linux-${{ inputs.target }}
        )
        if [[ -n "${CI}" && -n "${RUNNER_DEBUG}" ]]; then
          build_args+=(--debug)
        fi

        ${{ inputs.workingDirectory }}/.github/scripts/package-linux.sh "${package_args[@]}"

    - name: Run Windows packaging
      if: ${{ runner.os == 'Windows' }}
      shell: pwsh
      run: |
        $PackageArgs = @{
          Target = '${{ inputs.target }}'
          Configuration = '${{ inputs.config }}'
        }

        if ( '${{ inputs.createInstaller }}' -eq 'true' ) {
          $PackageArgs += @{BuildInstaller = $true}
        }

        if ( ( Test-Path env:CI ) -and ( Test-Path env:RUNNER_DEBUG ) ) {
          $BuildArgs += @{
            Debug = $true
          }
        }

        ${{ inputs.workingDirectory }}/.github/scripts/Package-Windows.ps1 @PackageArgs