From ae345a2f193a4d6022edda76523a39f6e891843e Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Sat, 24 Feb 2024 12:48:55 +0800 Subject: refactor!: rewrite python package --- .github/workflows/changelog.yml | 47 +++++++++++++++++++++++++++++++++++++++++ .github/workflows/pages.yml | 27 ----------------------- 2 files changed, 47 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/changelog.yml delete mode 100644 .github/workflows/pages.yml (limited to '.github') diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml new file mode 100644 index 0000000..e89687a --- /dev/null +++ b/.github/workflows/changelog.yml @@ -0,0 +1,47 @@ +name: CHANGELOG + +on: + push: + tags: + - "v*" + # - v[0-9]+.[0-9]+.[0-9]+ + workflow_dispatch: + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + id-token: write + steps: + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Update CHANGELOG + id: changelog + uses: requarks/changelog-action@v1 + with: + token: ${{ github.token }} + tag: ${{ github.ref_name }} + includeInvalidCommits: true + changelogFilePath: CHANGELOG.md + writeToFile: true + useGitmojis: false + + - name: Create Release + uses: ncipollo/release-action@v1.14.0 + with: + allowUpdates: true + draft: false + makeLatest: true + name: ${{ github.ref_name }} + body: ${{ steps.changelog.outputs.changes }} + token: ${{ github.token }} + + - name: Commit CHANGELOG.md + uses: stefanzweifel/git-auto-commit-action@v5 + with: + branch: main + commit_message: 'docs: update CHANGELOG.md for ${{ github.ref_name }} [skip ci]' + file_pattern: CHANGELOG.md diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml deleted file mode 100644 index eaf6a06..0000000 --- a/.github/workflows/pages.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: ci -on: - push: - branches: - - master - - main -permissions: - contents: write -jobs: - deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: 3.x - - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - - uses: actions/cache@v3 - with: - key: mkdocs-material-${{ env.cache_id }} - path: .cache - restore-keys: | - mkdocs-material- - - run: | - cd docs - pip install -r requirements.txt - mkdocs gh-deploy --force -- cgit v1.2.3-70-g09d2