mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2025-12-06 05:25:41 -05:00
Release tag to Copr
This commit is contained in:
24
.github/workflows/release.yml
vendored
24
.github/workflows/release.yml
vendored
@@ -7,6 +7,7 @@ on:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
actions: write
|
||||
|
||||
concurrency:
|
||||
group: release-${{ github.event.client_payload.tag }}
|
||||
@@ -217,3 +218,26 @@ jobs:
|
||||
files: _release_assets/**
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Extract plain version
|
||||
id: plain_version
|
||||
run: |
|
||||
set -e
|
||||
if [[ "$TAG" == v* ]]; then
|
||||
VERSION="${TAG#v}"
|
||||
else
|
||||
VERSION="$TAG"
|
||||
fi
|
||||
echo "plain=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Trigger Copr release workflow
|
||||
run: |
|
||||
set -euo pipefail
|
||||
VERSION="${{ steps.plain_version.outputs.plain }}"
|
||||
JSON_PAYLOAD=$(jq -n --arg version "$VERSION" '{inputs:{version:$version}}')
|
||||
curl -X POST \
|
||||
-H "Accept: application/vnd.github+json" \
|
||||
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
|
||||
-H "X-GitHub-Api-Version: 2022-11-28" \
|
||||
https://api.github.com/repos/${{ github.repository }}/actions/workflows/copr-release.yml/dispatches \
|
||||
-d "$JSON_PAYLOAD"
|
||||
|
||||
Reference in New Issue
Block a user