Skip to content

v3.11.0

v3.11.0 #21

name: Dispatch Workflow on Release
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "Tag name to dispatch with"
required: true
jobs:
dispatch:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Dispatch workflow in smoothcsv-website
env:
TARGET_REPO: smoothcsv/smoothcsv-website
TAG: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.event.release.tag_name }}
PAT: ${{ secrets.SMOOTHCSV_WEBSITE_DISPATCH_TOKEN }}
run: |
if [ -z "$TAG" ]; then
echo "No tag provided"; exit 1
fi
curl -sS -X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $PAT" \
https://api.github.com/repos/$TARGET_REPO/dispatches \
-d "{\"event_type\":\"smoothcsv3-release\",\"client_payload\":{\"tag\":\"$TAG\"}}"