Skip to content

Process and Publish Artifacts #3

Process and Publish Artifacts

Process and Publish Artifacts #3

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