mirror of
https://github.com/Wanxp/obsidian-douban.git
synced 2026-04-04 08:38:41 +08:00
test 增加提交发布功能
This commit is contained in:
parent
8556de0501
commit
f0b73c7d8b
24
.github/workflows/release-draft.yml
vendored
24
.github/workflows/release-draft.yml
vendored
@ -1,4 +1,3 @@
|
||||
|
||||
name: Release Draft
|
||||
|
||||
on:
|
||||
@ -7,13 +6,13 @@ on:
|
||||
- 'manifest.json'
|
||||
branches:
|
||||
- "master"
|
||||
# Allows you to run this workflow manually from the Actions tab
|
||||
workflow_dispatch:
|
||||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
@ -49,6 +48,20 @@ jobs:
|
||||
- name: Push tag
|
||||
run: git push origin "${{ env.VERSION }}"
|
||||
|
||||
- name: Generate release notes
|
||||
id: generate_release_notes
|
||||
uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const { generateReleaseNotes } = require('@actions/github/lib/utils');
|
||||
const releaseNotes = await generateReleaseNotes({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
tag_name: `v${{ env.VERSION }}`,
|
||||
previous_tag_name: `v${{ env.PREVIOUS_VERSION }}`
|
||||
});
|
||||
return releaseNotes.body;
|
||||
|
||||
- name: Create GitHub release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
@ -59,7 +72,7 @@ jobs:
|
||||
release_name: "${{ env.VERSION }}"
|
||||
draft: true
|
||||
prerelease: false
|
||||
body: ${{ github.event.head_commit.message }}
|
||||
body: ${{ steps.generate_release_notes.outputs.result }}
|
||||
|
||||
- name: Upload release assets
|
||||
uses: actions/upload-release-asset@v1
|
||||
@ -71,6 +84,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VERSION: ${{ env.VERSION }}
|
||||
|
||||
- name: Upload manifest.json
|
||||
uses: actions/upload-release-asset@v1
|
||||
with:
|
||||
@ -81,6 +95,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VERSION: ${{ env.VERSION }}
|
||||
|
||||
- name: Upload style.css
|
||||
uses: actions/upload-release-asset@v1
|
||||
with:
|
||||
@ -91,5 +106,6 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
VERSION: ${{ env.VERSION }}
|
||||
|
||||
- name: Output release message
|
||||
run: echo "发布预发布版本${{ env.VERSION }}正常"
|
||||
Loading…
Reference in New Issue
Block a user