-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathaction.yml
45 lines (45 loc) · 1.41 KB
/
action.yml
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
name: Publish catpkg
author: BSData
description: >
Publishes datafiles (catz/gstz), indexes (bsi, catpkg.json)
and a bsr package, attaching them to a given release for download.
inputs:
token:
description: GitHub auth token to authorize uploading release assets.
required: false
default: ${{ github.token }}
staging-path:
description: Path where assets will be written to before being uploaded.
required: false
default: ${{ runner.temp }}/assets
upload-url:
description: Upload URL for release assets.
required: false
default: ${{ github.event.release.upload_url }}
outputs:
staging-path:
description: Path where generated assets were saved.
value: ${{ inputs.staging-path }}
runs:
using: composite
steps:
- run: |
$ErrorActionPreference = 'Stop'
$event = Get-Content $env:GITHUB_EVENT_PATH -Raw | ConvertFrom-Json
$pubArgs = @{
Path = Get-Location
StagingPath = New-Item "$env:STAGING_PATH" -ItemType Directory -Force
Repository = $event.repository
Release = $event.release
ReleaseUploadUrl = $env:UPLOAD_URL
Token = $env:TOKEN
}
${{ github.action_path }}/action.ps1 @pubArgs
shell: pwsh
env:
STAGING_PATH: ${{ inputs.staging-path }}
TOKEN: ${{ inputs.token }}
UPLOAD_URL: ${{ inputs.upload-url }}
branding:
icon: book-open
color: blue