File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 1717 strategy :
1818 fail-fast : false
1919 matrix :
20- python-version : [3.6, 3.7, 3. 8]
20+ python-version : [3.8]
2121 steps :
2222 - uses : actions/checkout@v2
2323 - name : Set up Python ${{ matrix.python-version }}
Original file line number Diff line number Diff line change 1414
1515jobs :
1616 deploy :
17-
17+ env :
18+ PUBLISH_TAG : ${GITHUB_REF#refs/*/}
19+ VERSION_FILE : $(basename $GITHUB_REPOSITORY)/VERSION
1820 runs-on : ubuntu-latest
19-
2021 steps :
2122 - uses : actions/checkout@v2
2223 - name : Set up Python
@@ -27,12 +28,16 @@ jobs:
2728 run : |
2829 python -m pip install --upgrade pip
2930 pip install build
30- - name : Update VERSION
31+ - name : Check VERSION
3132 run : |
32- echo "${GITHUB_REF#refs/*/}" > carsons/VERSION
33+ if ! echo ${{ env.PUBLISH_TAG }} | grep -P -e "^\d+\.\d+\.\d+((rc|alpha)\d+)?$"; then
34+ echo "Tag ${{ env.PUBLISH_TAG }} doesn't match x.y.z pattern. Not pushing.";
35+ exit 1;
36+ fi
3337 - name : Build package
3438 run : |
35- echo "Building $(cat carsons/VERSION)"
39+ echo "Building ${{ env.PUBLISH_TAG }}"
40+ echo ${{ env.PUBLISH_TAG }} > ${{ env.VERSION_FILE }}
3641 python -m build
3742 - name : Publish package
3843 uses : pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
Original file line number Diff line number Diff line change 1- 0.0.2
1+ unreleased
You can’t perform that action at this time.
0 commit comments