ci(release): Add Gitea Actions workflow and release configuration
Publish Release / publish (push) Has been cancelled
Publish Release / publish (push) Has been cancelled
- Add `.gitea/release-config.json` to define conventional commit types and changelog sections - Add `.gitea/workflows/publish.yml` to automate version bumping, changelog generation, and Windows builds - Update `AUTOMATED_RELEASE.md` to reflect migration from GitHub Actions to Gitea Actions - Update documentation to specify Windows-only builds and Gitea Release creation - Add Gitea Token configuration instructions for repository setup - Configure workflow to run on main branch pushes with concurrency controls - Set up automated asset uploads for Windows executables and update files
This commit is contained in:
1 parent
083fa0e2f9
commit
31d5875425
3 files changed
+137
-7
No files matched your search
@@ -0,0 +1,44 @@
|
||||
{
|
||||
"types": [
|
||||
{
|
||||
"type": "feat",
|
||||
"section": "Features"
|
||||
},
|
||||
{
|
||||
"type": "fix",
|
||||
"section": "Bug Fixes"
|
||||
},
|
||||
{
|
||||
"type": "docs",
|
||||
"section": "Documentation"
|
||||
},
|
||||
{
|
||||
"type": "style",
|
||||
"section": "Styles"
|
||||
},
|
||||
{
|
||||
"type": "refactor",
|
||||
"section": "Refactoring"
|
||||
},
|
||||
{
|
||||
"type": "perf",
|
||||
"section": "Performance Improvements"
|
||||
},
|
||||
{
|
||||
"type": "test",
|
||||
"section": "Tests"
|
||||
},
|
||||
{
|
||||
"type": "build",
|
||||
"section": "Build System"
|
||||
},
|
||||
{
|
||||
"type": "ci",
|
||||
"section": "CI"
|
||||
},
|
||||
{
|
||||
"type": "chore",
|
||||
"section": "Chores"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,80 @@
|
||||
name: Publish Release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
# 在同一个工作流中处理发布任务
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config --global url."https://".insteadOf git://
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9
|
||||
run_install: |
|
||||
- recursive: true
|
||||
args: [--frozen-lockfile=false]
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --no-frozen-lockfile
|
||||
env:
|
||||
NPM_CONFIG_LEGACY_PEER_DEPS: true
|
||||
|
||||
- name: Setup Git user
|
||||
run: |
|
||||
git config --global user.name 'gitea-actions[bot]'
|
||||
git config --global user.email 'gitea-actions[bot]@users.noreply.gitea.com'
|
||||
|
||||
- name: Bump version and generate changelog
|
||||
shell: bash
|
||||
run: |
|
||||
# 根据 commit 信息自动更新版本和生成 changelog
|
||||
pnpm release
|
||||
|
||||
# 获取新版本号
|
||||
version=$(node -p "require('./package.json').version")
|
||||
echo "VERSION=$version" >> $GITHUB_ENV
|
||||
echo "Version set to: $version"
|
||||
|
||||
- name: Push changes
|
||||
run: |
|
||||
git push origin main
|
||||
git tag "v${{ env.VERSION }}"
|
||||
git push origin "v${{ env.VERSION }}"
|
||||
|
||||
- name: Build for Windows
|
||||
run: |
|
||||
pnpm build:win
|
||||
env:
|
||||
# 禁用 Windows 代码签名
|
||||
WIN_CSC_KEY_PASSWORD: ''
|
||||
|
||||
- name: Upload Release Assets
|
||||
uses: https://gitea.com/actions/release-action@main
|
||||
with:
|
||||
files: |
|
||||
release/**/*.exe
|
||||
release/**/*.exe.blockmap
|
||||
release/**/latest.yml
|
||||
release/**/app-update.yml
|
||||
Reference in new issue
Block a user