mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-05 21:06:38 +08:00
ci: automate release publishing
This commit is contained in:
@@ -3,6 +3,17 @@ name: Publish Docker image
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: ['v*', 'MediaStationGo-v*']
|
tags: ['v*', 'MediaStationGo-v*']
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: 'Image tag to publish, for example MediaStationGo-v0.0.32'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
ref:
|
||||||
|
description: 'Git ref to build from'
|
||||||
|
required: false
|
||||||
|
default: main
|
||||||
|
type: string
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -11,8 +22,12 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RELEASE_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.version || github.ref_name }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.ref }}
|
||||||
|
|
||||||
- uses: docker/setup-qemu-action@v3
|
- uses: docker/setup-qemu-action@v3
|
||||||
- uses: docker/setup-buildx-action@v3
|
- uses: docker/setup-buildx-action@v3
|
||||||
@@ -31,7 +46,7 @@ jobs:
|
|||||||
images: ghcr.io/shukebta/mediastation-go
|
images: ghcr.io/shukebta/mediastation-go
|
||||||
tags: |
|
tags: |
|
||||||
type=raw,value=latest
|
type=raw,value=latest
|
||||||
type=ref,event=tag
|
type=raw,value=${{ env.RELEASE_VERSION }}
|
||||||
|
|
||||||
- name: Build & push
|
- name: Build & push
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
|
|||||||
@@ -3,6 +3,17 @@ name: Publish release packages
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: ['v*', 'MediaStationGo-v*']
|
tags: ['v*', 'MediaStationGo-v*']
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
version:
|
||||||
|
description: 'Release tag to publish, for example MediaStationGo-v0.0.32'
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
ref:
|
||||||
|
description: 'Git ref to build from'
|
||||||
|
required: false
|
||||||
|
default: main
|
||||||
|
type: string
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: write
|
contents: write
|
||||||
@@ -10,10 +21,13 @@ permissions:
|
|||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RELEASE_VERSION: ${{ github.event_name == 'workflow_dispatch' && inputs.version || github.ref_name }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
ref: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.ref }}
|
||||||
|
|
||||||
- uses: actions/setup-go@v5
|
- uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
@@ -29,7 +43,7 @@ jobs:
|
|||||||
- name: Build release packages
|
- name: Build release packages
|
||||||
run: ./scripts/package-release.sh
|
run: ./scripts/package-release.sh
|
||||||
env:
|
env:
|
||||||
VERSION: ${{ github.ref_name }}
|
VERSION: ${{ env.RELEASE_VERSION }}
|
||||||
|
|
||||||
- name: Generate checksums
|
- name: Generate checksums
|
||||||
run: |
|
run: |
|
||||||
@@ -44,6 +58,8 @@ jobs:
|
|||||||
dist-release/*.zip
|
dist-release/*.zip
|
||||||
dist-release/SHA256SUMS.txt
|
dist-release/SHA256SUMS.txt
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
|
tag_name: ${{ env.RELEASE_VERSION }}
|
||||||
|
target_commitish: ${{ github.event_name == 'workflow_dispatch' && inputs.ref || github.sha }}
|
||||||
# GitHub immutable releases reject deleting/replacing existing assets.
|
# GitHub immutable releases reject deleting/replacing existing assets.
|
||||||
# Keep reruns idempotent by skipping same-name assets instead of
|
# Keep reruns idempotent by skipping same-name assets instead of
|
||||||
# deleting them first.
|
# deleting them first.
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ MediaStationGo 采用完全开源路线,核心媒体库、刮削、播放、
|
|||||||
| 下载联动 | qBittorrent / PT Site Adapter | 站点搜索、订阅、下载任务展示与脱敏 |
|
| 下载联动 | qBittorrent / PT Site Adapter | 站点搜索、订阅、下载任务展示与脱敏 |
|
||||||
| 外部兼容 | Emby-style API / DLNA | 面向外部播放器与三端客户端 |
|
| 外部兼容 | Emby-style API / DLNA | 面向外部播放器与三端客户端 |
|
||||||
| 部署 | Docker / Docker Compose / Shell / PowerShell | NAS、Linux、Windows 均可部署 |
|
| 部署 | Docker / Docker Compose / Shell / PowerShell | NAS、Linux、Windows 均可部署 |
|
||||||
| CI/CD | GitHub Actions / GHCR | 仅版本标签触发多架构镜像与 Release 包发布 |
|
| CI/CD | GitHub Actions / GHCR | 版本标签或手动 Actions 自动发布多架构镜像与 Release 包 |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -238,7 +238,7 @@ mkdir -p data cache media downloads
|
|||||||
```bash
|
```bash
|
||||||
cat > .env <<'EOF'
|
cat > .env <<'EOF'
|
||||||
# 固定版本;需要升级时改成新的 MediaStationGo-vX.Y.Z 后执行 docker compose pull && docker compose up -d
|
# 固定版本;需要升级时改成新的 MediaStationGo-vX.Y.Z 后执行 docker compose pull && docker compose up -d
|
||||||
MEDIASTATION_IMAGE_TAG=MediaStationGo-v0.0.31
|
MEDIASTATION_IMAGE_TAG=MediaStationGo-v0.0.32
|
||||||
MEDIASTATION_HTTP_PORT=18080
|
MEDIASTATION_HTTP_PORT=18080
|
||||||
|
|
||||||
# 程序数据和缓存建议放在 MediaStationGo 部署目录下,便于备份和迁移。
|
# 程序数据和缓存建议放在 MediaStationGo 部署目录下,便于备份和迁移。
|
||||||
@@ -307,7 +307,7 @@ vim docker-compose.yml
|
|||||||
#
|
#
|
||||||
# 镜像版本:
|
# 镜像版本:
|
||||||
# 默认拉取 latest;如需固定版本,创建 .env 并写入:
|
# 默认拉取 latest;如需固定版本,创建 .env 并写入:
|
||||||
# MEDIASTATION_IMAGE_TAG=MediaStationGo-v0.0.31
|
# MEDIASTATION_IMAGE_TAG=MediaStationGo-v0.0.32
|
||||||
#
|
#
|
||||||
# 路径映射总览:
|
# 路径映射总览:
|
||||||
# /data 程序数据目录。保存 SQLite 数据库、JWT secret、系统配置等,必须持久化。
|
# /data 程序数据目录。保存 SQLite 数据库、JWT secret、系统配置等,必须持久化。
|
||||||
@@ -516,7 +516,7 @@ docker compose up -d
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
cat > .env <<'EOF'
|
cat > .env <<'EOF'
|
||||||
MEDIASTATION_IMAGE_TAG=MediaStationGo-v0.0.31
|
MEDIASTATION_IMAGE_TAG=MediaStationGo-v0.0.32
|
||||||
MEDIASTATION_HTTP_PORT=18080
|
MEDIASTATION_HTTP_PORT=18080
|
||||||
MEDIASTATION_DATA_DIR=./data
|
MEDIASTATION_DATA_DIR=./data
|
||||||
MEDIASTATION_CACHE_DIR=./cache
|
MEDIASTATION_CACHE_DIR=./cache
|
||||||
@@ -779,26 +779,26 @@ cd MediaStationGo
|
|||||||
|
|
||||||
| 平台 | 包名示例 |
|
| 平台 | 包名示例 |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| Linux x86_64 | `MediaStationGo-v0.0.31-linux-amd64.tar.gz` |
|
| Linux x86_64 | `MediaStationGo-v0.0.32-linux-amd64.tar.gz` |
|
||||||
| Linux ARM64 | `MediaStationGo-v0.0.31-linux-arm64.tar.gz` |
|
| Linux ARM64 | `MediaStationGo-v0.0.32-linux-arm64.tar.gz` |
|
||||||
| Windows x86_64 | `MediaStationGo-v0.0.31-windows-amd64.zip` |
|
| Windows x86_64 | `MediaStationGo-v0.0.32-windows-amd64.zip` |
|
||||||
| macOS Intel | `MediaStationGo-v0.0.31-darwin-amd64.tar.gz` |
|
| macOS Intel | `MediaStationGo-v0.0.32-darwin-amd64.tar.gz` |
|
||||||
| macOS Apple Silicon | `MediaStationGo-v0.0.31-darwin-arm64.tar.gz` |
|
| macOS Apple Silicon | `MediaStationGo-v0.0.32-darwin-arm64.tar.gz` |
|
||||||
|
|
||||||
部署步骤:
|
部署步骤:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Linux 示例
|
# Linux 示例
|
||||||
tar -xzf MediaStationGo-v0.0.31-linux-amd64.tar.gz
|
tar -xzf MediaStationGo-v0.0.32-linux-amd64.tar.gz
|
||||||
cd MediaStationGo-v0.0.31-linux-amd64
|
cd MediaStationGo-v0.0.32-linux-amd64
|
||||||
MEDIASTATION_APP_PORT=18080 ./mediastation-go
|
MEDIASTATION_APP_PORT=18080 ./mediastation-go
|
||||||
```
|
```
|
||||||
|
|
||||||
Windows:
|
Windows:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
Expand-Archive .\MediaStationGo-v0.0.31-windows-amd64.zip
|
Expand-Archive .\MediaStationGo-v0.0.32-windows-amd64.zip
|
||||||
cd .\MediaStationGo-v0.0.31-windows-amd64
|
cd .\MediaStationGo-v0.0.32-windows-amd64
|
||||||
$env:MEDIASTATION_APP_PORT = "18080"
|
$env:MEDIASTATION_APP_PORT = "18080"
|
||||||
.\mediastation-go.exe
|
.\mediastation-go.exe
|
||||||
```
|
```
|
||||||
|
|||||||
+12
-12
@@ -177,7 +177,7 @@ The current base license is `GPL-3.0`, and contributions are welcome under that
|
|||||||
| Downloads | qBittorrent / PT site adapters | Search, subscriptions, task cards, private URL redaction |
|
| Downloads | qBittorrent / PT site adapters | Search, subscriptions, task cards, private URL redaction |
|
||||||
| Compatibility | Emby-style API / DLNA | External clients and player integrations |
|
| Compatibility | Emby-style API / DLNA | External clients and player integrations |
|
||||||
| Deployment | Docker / Docker Compose / Shell / PowerShell | NAS, Linux, Windows, and macOS friendly |
|
| Deployment | Docker / Docker Compose / Shell / PowerShell | NAS, Linux, Windows, and macOS friendly |
|
||||||
| CI/CD | GitHub Actions / GHCR | Multi-arch Docker images and release packages only on version tags |
|
| CI/CD | GitHub Actions / GHCR | Version tags or manual Actions runs publish multi-arch Docker images and release packages |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -235,7 +235,7 @@ mkdir -p data cache media downloads
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
cat > .env <<'EOF'
|
cat > .env <<'EOF'
|
||||||
MEDIASTATION_IMAGE_TAG=MediaStationGo-v0.0.31
|
MEDIASTATION_IMAGE_TAG=MediaStationGo-v0.0.32
|
||||||
MEDIASTATION_HTTP_PORT=18080
|
MEDIASTATION_HTTP_PORT=18080
|
||||||
MEDIASTATION_DATA_DIR=./data
|
MEDIASTATION_DATA_DIR=./data
|
||||||
MEDIASTATION_CACHE_DIR=./cache
|
MEDIASTATION_CACHE_DIR=./cache
|
||||||
@@ -344,7 +344,7 @@ For production, pin a specific release tag instead of using `latest`. Recommende
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
cat > .env <<'EOF'
|
cat > .env <<'EOF'
|
||||||
MEDIASTATION_IMAGE_TAG=MediaStationGo-v0.0.31
|
MEDIASTATION_IMAGE_TAG=MediaStationGo-v0.0.32
|
||||||
MEDIASTATION_HTTP_PORT=18080
|
MEDIASTATION_HTTP_PORT=18080
|
||||||
MEDIASTATION_DATA_DIR=./data
|
MEDIASTATION_DATA_DIR=./data
|
||||||
MEDIASTATION_CACHE_DIR=./cache
|
MEDIASTATION_CACHE_DIR=./cache
|
||||||
@@ -593,25 +593,25 @@ Each release provides multi-platform archives:
|
|||||||
|
|
||||||
| Platform | Package example |
|
| Platform | Package example |
|
||||||
| --- | --- |
|
| --- | --- |
|
||||||
| Linux x86_64 | `MediaStationGo-v0.0.31-linux-amd64.tar.gz` |
|
| Linux x86_64 | `MediaStationGo-v0.0.32-linux-amd64.tar.gz` |
|
||||||
| Linux ARM64 | `MediaStationGo-v0.0.31-linux-arm64.tar.gz` |
|
| Linux ARM64 | `MediaStationGo-v0.0.32-linux-arm64.tar.gz` |
|
||||||
| Windows x86_64 | `MediaStationGo-v0.0.31-windows-amd64.zip` |
|
| Windows x86_64 | `MediaStationGo-v0.0.32-windows-amd64.zip` |
|
||||||
| macOS Intel | `MediaStationGo-v0.0.31-darwin-amd64.tar.gz` |
|
| macOS Intel | `MediaStationGo-v0.0.32-darwin-amd64.tar.gz` |
|
||||||
| macOS Apple Silicon | `MediaStationGo-v0.0.31-darwin-arm64.tar.gz` |
|
| macOS Apple Silicon | `MediaStationGo-v0.0.32-darwin-arm64.tar.gz` |
|
||||||
|
|
||||||
Linux example:
|
Linux example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
tar -xzf MediaStationGo-v0.0.31-linux-amd64.tar.gz
|
tar -xzf MediaStationGo-v0.0.32-linux-amd64.tar.gz
|
||||||
cd MediaStationGo-v0.0.31-linux-amd64
|
cd MediaStationGo-v0.0.32-linux-amd64
|
||||||
MEDIASTATION_APP_PORT=18080 ./mediastation-go
|
MEDIASTATION_APP_PORT=18080 ./mediastation-go
|
||||||
```
|
```
|
||||||
|
|
||||||
Windows example:
|
Windows example:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
Expand-Archive .\MediaStationGo-v0.0.31-windows-amd64.zip
|
Expand-Archive .\MediaStationGo-v0.0.32-windows-amd64.zip
|
||||||
cd .\MediaStationGo-v0.0.31-windows-amd64
|
cd .\MediaStationGo-v0.0.32-windows-amd64
|
||||||
$env:MEDIASTATION_APP_PORT = "18080"
|
$env:MEDIASTATION_APP_PORT = "18080"
|
||||||
.\mediastation-go.exe
|
.\mediastation-go.exe
|
||||||
```
|
```
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@
|
|||||||
#
|
#
|
||||||
# 镜像版本:
|
# 镜像版本:
|
||||||
# 默认拉取 latest;如需固定版本,创建 .env 并写入:
|
# 默认拉取 latest;如需固定版本,创建 .env 并写入:
|
||||||
# MEDIASTATION_IMAGE_TAG=MediaStationGo-v0.0.31
|
# MEDIASTATION_IMAGE_TAG=MediaStationGo-v0.0.32
|
||||||
#
|
#
|
||||||
# 路径映射总览:
|
# 路径映射总览:
|
||||||
# /data 程序数据目录。保存 SQLite 数据库、JWT secret、系统配置等,必须持久化。
|
# /data 程序数据目录。保存 SQLite 数据库、JWT secret、系统配置等,必须持久化。
|
||||||
|
|||||||
Reference in New Issue
Block a user