Skip to content

Commit

Permalink
添加版本检测条件
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-clan committed Sep 12, 2023
1 parent 35aa196 commit e42e9b4
Showing 1 changed file with 25 additions and 11 deletions.
36 changes: 25 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,6 @@ on:
pull_request:

jobs:
check_version:
name: check version
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Check whether the GITHUB release matches the package version
uses: samuelcolvin/check-python-version@v4
with:
version_file_path: httpfpt/__init__.py

lint:
runs-on: ubuntu-latest
name: lint ${{ matrix.python-version }}
Expand Down Expand Up @@ -51,3 +40,28 @@ jobs:
with:
project: .
verbose: true

# https://github.com/re-actors/alls-green
check:
name: check the status of other workflow jobs
runs-on: ubuntu-latest
if: always()
needs: [ lint ]
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

check-version:
name: check version
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [ check ]
steps:
- uses: actions/checkout@v3

- name: Check whether the GITHUB release matches the package version
uses: samuelcolvin/check-python-version@v4
with:
version_file_path: httpfpt/__init__.py

0 comments on commit e42e9b4

Please sign in to comment.