Filaman/.github/workflows/release.yml

32 lines
869 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
elif [[ "$CI_SERVER_URL" == *"gitlab"* ]]; then
echo "platform=gitlab" >> $GITHUB_OUTPUT
else
echo "platform=gitea" >> $GITHUB_OUTPUT
fi
- name: Run GitHub Release
if: steps.platform.outputs.platform == 'github'
uses: ./.github/workflows/providers/github-release.yml
- name: Run Gitea Release
if: steps.platform.outputs.platform == 'gitea'
uses: ./.github/workflows/providers/gitea-release.yml