mirror of
https://github.com/nonebot/nonebot2.git
synced 2025-02-22 02:25:56 +08:00
👷 use noneflow app (#1892)
This commit is contained in:
parent
8e5ec5c4e7
commit
908622cf61
17
.github/workflows/publish-bot.yml
vendored
17
.github/workflows/publish-bot.yml
vendored
@ -26,28 +26,37 @@ jobs:
|
|||||||
- name: Install Poetry
|
- name: Install Poetry
|
||||||
if: ${{ !startsWith(github.event_name, 'pull_request') }}
|
if: ${{ !startsWith(github.event_name, 'pull_request') }}
|
||||||
run: pipx install poetry
|
run: pipx install poetry
|
||||||
|
|
||||||
- name: Setup Python
|
- name: Setup Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.10"
|
||||||
|
|
||||||
- name: Test Plugin
|
- name: Test Plugin
|
||||||
id: plugin-test
|
id: plugin-test
|
||||||
run: |
|
run: |
|
||||||
curl -sSL https://github.com/nonebot/nonebot2-publish-bot/releases/latest/download/plugin_test.py -o plugin_test.py
|
curl -sSL https://github.com/nonebot/nonebot2-publish-bot/releases/latest/download/plugin_test.py | python -
|
||||||
python plugin_test.py
|
|
||||||
publish_bot:
|
publish_bot:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: nonebot2 publish bot
|
name: nonebot2 publish bot
|
||||||
needs: plugin_test
|
needs: plugin_test
|
||||||
steps:
|
steps:
|
||||||
|
- name: Generate token
|
||||||
|
id: generate-token
|
||||||
|
uses: tibdex/github-app-token@v1
|
||||||
|
with:
|
||||||
|
app_id: ${{ secrets.APP_ID }}
|
||||||
|
private_key: ${{ secrets.APP_KEY }}
|
||||||
|
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
|
||||||
- name: NoneBot2 Publish Bot
|
- name: NoneBot2 Publish Bot
|
||||||
uses: docker://ghcr.io/nonebot/nonebot2-publish-bot:latest
|
uses: docker://ghcr.io/nonebot/nonebot2-publish-bot:latest
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
config: >
|
config: >
|
||||||
{
|
{
|
||||||
"base": "master",
|
"base": "master",
|
||||||
|
13
.github/workflows/release-drafter.yml
vendored
13
.github/workflows/release-drafter.yml
vendored
@ -18,9 +18,16 @@ jobs:
|
|||||||
group: pull-request-changelog
|
group: pull-request-changelog
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
steps:
|
steps:
|
||||||
|
- name: Generate token
|
||||||
|
id: generate-token
|
||||||
|
uses: tibdex/github-app-token@v1
|
||||||
|
with:
|
||||||
|
app_id: ${{ secrets.APP_ID }}
|
||||||
|
private_key: ${{ secrets.APP_KEY }}
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
|
||||||
- name: Setup Node Environment
|
- name: Setup Node Environment
|
||||||
uses: ./.github/actions/setup-node
|
uses: ./.github/actions/setup-node
|
||||||
@ -43,8 +50,8 @@ jobs:
|
|||||||
- name: Commit and Push
|
- name: Commit and Push
|
||||||
run: |
|
run: |
|
||||||
yarn prettier
|
yarn prettier
|
||||||
git config user.name github-actions[bot]
|
git config user.name noneflow[bot]
|
||||||
git config user.email github-actions[bot]@users.noreply.github.com
|
git config user.email 129742071+noneflow[bot]@users.noreply.github.com
|
||||||
git add .
|
git add .
|
||||||
git diff-index --quiet HEAD || git commit -m ":memo: Update changelog"
|
git diff-index --quiet HEAD || git commit -m ":memo: Update changelog"
|
||||||
git push
|
git push
|
||||||
|
15
.github/workflows/release.yml
vendored
15
.github/workflows/release.yml
vendored
@ -6,12 +6,17 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Generate token
|
||||||
|
id: generate-token
|
||||||
|
uses: tibdex/github-app-token@v1
|
||||||
|
with:
|
||||||
|
app_id: ${{ secrets.APP_ID }}
|
||||||
|
private_key: ${{ secrets.APP_KEY }}
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
ref: master
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
token: ${{ secrets.GH_TOKEN }}
|
|
||||||
|
|
||||||
- name: Setup Python Environment
|
- name: Setup Python Environment
|
||||||
uses: ./.github/actions/setup-python
|
uses: ./.github/actions/setup-python
|
||||||
@ -39,8 +44,8 @@ jobs:
|
|||||||
|
|
||||||
- name: Push Tag
|
- name: Push Tag
|
||||||
run: |
|
run: |
|
||||||
git config user.name github-actions[bot]
|
git config user.name noneflow[bot]
|
||||||
git config user.email github-actions[bot]@users.noreply.github.com
|
git config user.email 129742071+noneflow[bot]@users.noreply.github.com
|
||||||
git add .
|
git add .
|
||||||
git commit -m ":bookmark: Release $(poetry version -s)"
|
git commit -m ":bookmark: Release $(poetry version -s)"
|
||||||
git tag ${{ env.TAG_NAME }}
|
git tag ${{ env.TAG_NAME }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user