-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.47 KB
/
process-artifacts.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
46
47
48
49
50
51
name: Process and Publish Artifacts
on:
workflow_dispatch:
inputs:
release_tag:
description: 'Release tag to process artifacts from'
required: true
type: string
jobs:
process-artifacts:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up environment
run: |
echo "RELEASE_TAG=${{ github.event.inputs.release_tag }}" >> $GITHUB_ENV
- name: Download and process artifacts
run: |
./process_artifacts.sh "${{ env.RELEASE_TAG }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: processed-${{ env.RELEASE_TAG }}
release_name: Processed Artifacts for ${{ env.RELEASE_TAG }}
draft: false
prerelease: false
- name: Upload Release Assets
run: |
for file in artifacts/*.node; do
filename=$(basename "$file")
echo "Uploading $filename"
curl -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file" \
"${{ steps.create_release.outputs.upload_url }}?name=$filename"
done
- name: Clean up
run: rm -rf artifacts