Filaman/.github/workflows/release.yml

30 lines
731 B
YAML
Raw Normal View History

name: Release
on:
push:
tags:
- 'v*'
jobs:
detect-and-run:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Determine hosting platform
id: platform
run: |
if [[ "$GITHUB_SERVER_URL" == "https://github.com" ]]; then
echo "platform=github" >> $GITHUB_OUTPUT
else
echo "platform=gitea" >> $GITHUB_OUTPUT
fi
- name: Run Release Workflow
run: |
if [[ "${{ steps.platform.outputs.platform }}" == "github" ]]; then
./.github/workflows/providers/github-release.sh
else
./.github/workflows/providers/gitea-release.sh
fi