Skip to content

Commit 5529bd4

Browse files
Add node directory and action to upload a file to s3 (#14)
1 parent 030c543 commit 5529bd4

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

node/publish_asset_to_s3/action.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
2+
name: Publish Release Asset to S3
3+
description: "Publish Asset to S3"
4+
inputs:
5+
version:
6+
description: "The published version"
7+
required: true
8+
product_name:
9+
description: "The name of the product"
10+
required: true
11+
file:
12+
description: file to upload
13+
required: true
14+
dry_run:
15+
description: "Whether this is a dry run"
16+
required: false
17+
default: 'false'
18+
19+
runs:
20+
using: composite
21+
steps:
22+
- name: Run publish script
23+
shell: bash
24+
run: |
25+
set -eux
26+
if [ "$DRY_RUN" == "false" ]; then
27+
echo "Uploading Release Reports"
28+
TARGET=s3://${AWS_BUCKET}/${PRODUCT_NAME}/${VERSION}/${FILE}
29+
aws s3 cp $FILE $TARGET
30+
else
31+
echo "Dry run, not uploading to S3 or creating GitHub Release"
32+
echo "Would upload $FILE"
33+
cat $FILE
34+
fi
35+
env:
36+
VERSION: ${{ inputs.version }}
37+
PRODUCT_NAME: ${{ inputs.product_name }}
38+
DRY_RUN: ${{ inputs.dry_run }}
39+
FILE: ${{ inputs.file }}

0 commit comments

Comments
 (0)