Compare commits
2
Commits
main
..
action-test
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d300bfd15c | ||
|
|
82d2736cea |
@@ -3,7 +3,7 @@ name: Publish Release
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- action-test
|
||||||
|
|
||||||
# 在同一个工作流中处理发布任务
|
# 在同一个工作流中处理发布任务
|
||||||
concurrency:
|
concurrency:
|
||||||
@@ -12,7 +12,7 @@ concurrency:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
publish:
|
publish:
|
||||||
runs-on: windows-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -24,9 +24,9 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: '20'
|
node-version: '20'
|
||||||
|
|
||||||
- name: Configure Git
|
# - name: Configure Git
|
||||||
run: |
|
# run: |
|
||||||
git config --global url."https://".insteadOf git://
|
# git config --global url."https://".insteadOf git://
|
||||||
|
|
||||||
- name: Setup pnpm
|
- name: Setup pnpm
|
||||||
uses: pnpm/action-setup@v4
|
uses: pnpm/action-setup@v4
|
||||||
@@ -41,40 +41,40 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NPM_CONFIG_LEGACY_PEER_DEPS: true
|
NPM_CONFIG_LEGACY_PEER_DEPS: true
|
||||||
|
|
||||||
- name: Setup Git user
|
# - name: Setup Git user
|
||||||
run: |
|
# run: |
|
||||||
git config --global user.name 'gitea-actions[bot]'
|
# git config --global user.name 'gitea-actions[bot]'
|
||||||
git config --global user.email 'gitea-actions[bot]@users.noreply.gitea.com'
|
# git config --global user.email 'gitea-actions[bot]@users.noreply.gitea.com'
|
||||||
|
|
||||||
- name: Bump version and generate changelog
|
# - name: Bump version and generate changelog
|
||||||
shell: bash
|
# shell: bash
|
||||||
run: |
|
# run: |
|
||||||
# 根据 commit 信息自动更新版本和生成 changelog
|
# # 根据 commit 信息自动更新版本和生成 changelog
|
||||||
pnpm release
|
# pnpm release
|
||||||
|
|
||||||
# 获取新版本号
|
# # 获取新版本号
|
||||||
version=$(node -p "require('./package.json').version")
|
# version=$(node -p "require('./package.json').version")
|
||||||
echo "VERSION=$version" >> $GITHUB_ENV
|
# echo "VERSION=$version" >> $GITHUB_ENV
|
||||||
echo "Version set to: $version"
|
# echo "Version set to: $version"
|
||||||
|
|
||||||
- name: Push changes
|
# - name: Push changes
|
||||||
run: |
|
# run: |
|
||||||
git push origin main
|
# git push origin main
|
||||||
git tag "v${{ env.VERSION }}"
|
# git tag "v${{ env.VERSION }}"
|
||||||
git push origin "v${{ env.VERSION }}"
|
# git push origin "v${{ env.VERSION }}"
|
||||||
|
|
||||||
- name: Build for Windows
|
- name: Build for Windows
|
||||||
run: |
|
run: |
|
||||||
pnpm build:win
|
pnpm build:linux
|
||||||
env:
|
env:
|
||||||
# 禁用 Windows 代码签名
|
# 禁用 Windows 代码签名
|
||||||
WIN_CSC_KEY_PASSWORD: ''
|
WIN_CSC_KEY_PASSWORD: ''
|
||||||
|
|
||||||
- name: Upload Release Assets
|
# - name: Upload Release Assets
|
||||||
uses: https://gitea.com/actions/release-action@main
|
# uses: https://gitea.com/actions/release-action@main
|
||||||
with:
|
# with:
|
||||||
files: |
|
# files: |
|
||||||
release/**/*.exe
|
# release/**/*.exe
|
||||||
release/**/*.exe.blockmap
|
# release/**/*.exe.blockmap
|
||||||
release/**/latest.yml
|
# release/**/latest.yml
|
||||||
release/**/app-update.yml
|
# release/**/app-update.yml
|
||||||
Reference in new issue
Block a user