Skip to content

Commit 6e58622

Browse files
committed
Add support for metadata artifacts and custom target
1 parent 98b0889 commit 6e58622

File tree

6 files changed

+2242
-1017
lines changed

6 files changed

+2242
-1017
lines changed

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ A GitHub action for uploading build artifacts to Buildstash.
2020
custom_build_number: '12345' # Optional custom build number
2121
platform: 'android' # Assuming platform is Android, see Buildstash documentation for other platforms
2222
stream: 'default' # Exact name of a build stream in your app
23+
# Optional metadata artifacts (JSON format with optional descriptions)
24+
metadata_artifacts: |
25+
[
26+
{"path": "metadata.json", "description": "Build metadata and version info"},
27+
{"path": "changelog.md", "description": "Release notes and changes"},
28+
{"path": "readme.txt"}
29+
]
2330
# Optional build associations
2431
labels: |
2532
to-review
@@ -30,6 +37,7 @@ A GitHub action for uploading build artifacts to Buildstash.
3037
armv8
3138
arm64v8
3239
armv9
40+
custom_target: 'my-custom-target' # Exact name of your custom target, associated with both app and platform
3341
# Optional CI information
3442
ci_pipeline: ${{ github.workflow }}
3543
ci_run_id: ${{ github.run_id }}
@@ -47,6 +55,38 @@ A GitHub action for uploading build artifacts to Buildstash.
4755
### Upload expansion file
4856
You may also optionally pass in a single expansion file, if the platform / primary file supports it. For example, if you upload an .apk, you could upload an .obb with it. To do so set 'structure' to `file+expansion`, and pass in 'expansion_file_path'.
4957

58+
### Upload metadata files
59+
Optional related metadata files can be uploaded alongside the binaries for your actual build. These may include SBOMs (SPDX / CycloneDX), build logs, test results, changelogs, etc.
60+
61+
**Format:** JSON array with `path` (required) and `description` (optional) fields.
62+
63+
**Examples:**
64+
```yaml
65+
# With descriptions
66+
metadata_artifacts: |
67+
[
68+
{"path": "metadata.json", "description": "Build metadata and version info"},
69+
{"path": "changelog.md", "description": "Release notes and changes"},
70+
{"path": "sbom.spdx", "description": "Software Bill of Materials"}
71+
]
72+
73+
# Without descriptions
74+
metadata_artifacts: |
75+
[
76+
{"path": "metadata.json"},
77+
{"path": "changelog.md"}
78+
]
79+
80+
# Mixed (some with, some without descriptions)
81+
metadata_artifacts: |
82+
[
83+
{"path": "metadata.json", "description": "Build metadata"},
84+
{"path": "changelog.md"}
85+
]
86+
```
87+
88+
**Note:** Maximum of 10 metadata files per upload. Additional files will be skipped with a warning.
89+
5090
### API key
5191
You will need to generate an application specific API key, and save it as an [Actions secret](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions) in your repository.
5292

action.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,18 @@ inputs:
7676
platform:
7777
description: 'Platform'
7878
required: true
79+
custom_target:
80+
description: 'Custom target'
81+
required: false
7982
stream:
8083
description: 'Stream'
8184
required: true
8285
notes:
8386
description: 'Build notes'
8487
required: false
88+
metadata_artifacts:
89+
description: 'Related metadata files. JSON array of filepath and optional description'
90+
required: false
8591
outputs:
8692
build_id:
8793
description: 'The ID of the uploaded build'

0 commit comments

Comments
 (0)