Skip to content

Commit

Permalink
兼容pydantic-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
ssttkkl committed Oct 19, 2024
1 parent 23f3437 commit 9d98c18
Show file tree
Hide file tree
Showing 9 changed files with 1,862 additions and 1,416 deletions.
4 changes: 4 additions & 0 deletions .github/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
template: |
## What’s Changed
$CHANGES
72 changes: 0 additions & 72 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

61 changes: 0 additions & 61 deletions .github/workflows/python-build.yml

This file was deleted.

57 changes: 0 additions & 57 deletions .github/workflows/python-publish.yml

This file was deleted.

54 changes: 54 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Release

on:
push:
tags:
- v*

jobs:
publish-pypi-github:
runs-on: ubuntu-latest
environment:
name: release
url: https://pypi.org/p/nonebot-plugin-access-control
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
# write permission is required to create a github release
contents: write
# write permission is required for autolabeler
# otherwise, read permission is required at least
pull-requests: write

steps:
- uses: actions/checkout@v3

- name: Setup Python environment
uses: actions/setup-python@v3
with:
python-version: "3.11"

- name: Setup Poetry
run: |
pip install poetry
- run: |
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:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish PyPI and Github
run: |
poetry build
ls dist/
gh release upload --clobber ${{ env.TAG_NAME }} dist/*.tar.gz dist/*.whl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish pypi
uses: pypa/gh-action-pypi-publish@release/v1
Loading

0 comments on commit 9d98c18

Please sign in to comment.