feat: add Gitea support to release workflow
Add platform detection to support creating releases on both GitHub and Gitea servers. The workflow now: - Detects the platform using github.server_url - Uses GitHub CLI (gh) for GitHub releases - Uses gitea-release-action for Gitea releases - Creates draft releases with the same artifacts on both platforms
This commit is contained in:
28
.github/workflows/release.yml
vendored
28
.github/workflows/release.yml
vendored
@@ -75,7 +75,8 @@ jobs:
|
||||
echo "File sizes:"
|
||||
ls -lh main.js manifest.json styles.css
|
||||
|
||||
- name: Create draft release
|
||||
- name: Create draft release (GitHub)
|
||||
if: github.server_url == 'https://github.com'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
@@ -106,3 +107,28 @@ jobs:
|
||||
|
||||
echo "✅ Draft release created: $TAG_VERSION"
|
||||
echo "Visit https://github.com/${{ github.repository }}/releases to review and publish"
|
||||
|
||||
- name: Create draft release (Gitea)
|
||||
if: github.server_url != 'https://github.com'
|
||||
uses: https://gitea.com/actions/gitea-release-action@main
|
||||
with:
|
||||
files: |
|
||||
main.js
|
||||
manifest.json
|
||||
styles.css
|
||||
draft: true
|
||||
title: ${{ github.ref_name }}
|
||||
body: |
|
||||
Release ${{ github.ref_name }}
|
||||
|
||||
## Changes
|
||||
|
||||
*Add release notes here before publishing*
|
||||
|
||||
## Installation
|
||||
|
||||
1. Download main.js, manifest.json, and styles.css
|
||||
2. Create a folder in .obsidian/plugins/obsidian-mcp-server/
|
||||
3. Copy the three files into the folder
|
||||
4. Reload Obsidian
|
||||
5. Enable the plugin in Settings → Community Plugins
|
||||
|
||||
Reference in New Issue
Block a user