mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-07 12:23:00 +08:00
update
This commit is contained in:
parent
8ea7841e49
commit
272b5b8744
35
.github/workflows/release-trigger.yml
vendored
Normal file
35
.github/workflows/release-trigger.yml
vendored
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
name: Trigger Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
archive:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
ref: main
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Setup Python environment
|
||||||
|
uses: ./.github/actions/setup-python
|
||||||
|
|
||||||
|
- run: echo "TAG_NAME=v$(poetry version -s)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Archive Changelog
|
||||||
|
uses: docker://ghcr.io/nonebot/auto-changelog:master
|
||||||
|
with:
|
||||||
|
archive_regex: '(?<=## )最近更新(?=\n)'
|
||||||
|
archive_title: ${{ env.TAG_NAME }}
|
||||||
|
commit_and_push: false
|
||||||
|
|
||||||
|
- name: Push Tag
|
||||||
|
run: |
|
||||||
|
git config user.name github-actions[bot]
|
||||||
|
git config user.email github-actions[bot]@users.noreply.github.com
|
||||||
|
git add .
|
||||||
|
git commit -m ":bookmark: Release $(poetry version -s)"
|
||||||
|
git tag ${{ env.TAG_NAME }}
|
||||||
|
git push && git push --tags
|
24
.github/workflows/release.yml
vendored
24
.github/workflows/release.yml
vendored
@ -1,8 +1,9 @@
|
|||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
release:
|
push:
|
||||||
types: [published]
|
tags:
|
||||||
|
- v*
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-frontend:
|
build-frontend:
|
||||||
@ -19,7 +20,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: frontend
|
name: frontend
|
||||||
path: ./admin-frontend/build/
|
path: ./admin-frontend/build/
|
||||||
publish-pypi:
|
publish-pypi-github:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build-frontend
|
needs: build-frontend
|
||||||
|
|
||||||
@ -38,12 +39,21 @@ jobs:
|
|||||||
- name: Publish PyPI
|
- name: Publish PyPI
|
||||||
run: poetry publish --build -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} || echo "Already pushed to pypi"
|
run: poetry publish --build -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} || echo "Already pushed to pypi"
|
||||||
|
|
||||||
- name: Upload Release Assets
|
- run: |
|
||||||
uses: alexellis/upload-assets@0.2.3
|
echo "TAG_NAME=${GITHUB_REF#refs/tags/} >> $GITHUB_ENV"
|
||||||
|
|
||||||
|
- uses: release-drafter/release-drafter@v5
|
||||||
|
with:
|
||||||
|
name: Release ${{ env.TAG_NAME }}
|
||||||
|
tag: ${{ env.TAG_NAME }}
|
||||||
|
publish: true
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
|
||||||
asset_paths: '["./dist/*"]'
|
- run: |
|
||||||
|
gh release upload --clobber ${{ env.TAG_NAME }} dist/*
|
||||||
|
|
||||||
|
|
||||||
publish-docker:
|
publish-docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: build-frontend
|
needs: build-frontend
|
||||||
|
Loading…
x
Reference in New Issue
Block a user