hotfix(docs): rollback readme for publishing [cd build] #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish-pypi | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
check_build_trigger: | |
name: Check build trigger | |
runs-on: ubuntu-latest | |
outputs: | |
build: ${{ steps.check_build_trigger.outputs.build }} | |
steps: | |
- name: Checkout auto-sklong | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
- id: check_build_trigger | |
name: Check build trigger | |
run: bash build_tools/github/check_build_trigger.sh | |
unit_testing: | |
runs-on: ${{ matrix.os }} | |
needs: check_build_trigger | |
if: needs.check_build_trigger.outputs.build | |
strategy: | |
matrix: | |
python-version: [ 3.9 ] | |
os: [ ubuntu-latest ] | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Checkout this repository | |
uses: actions/checkout@v2 | |
- uses: pdm-project/setup-pdm@main | |
name: Setup PDM | |
with: | |
python-version: 3.9 | |
architecture: x64 | |
prerelease: false | |
enable-pep582: true | |
- name: Install dependencies from pdm.lock | |
run: | | |
pdm install | |
- name: Run tests | |
run: pdm run tests | |
pypi-publish: | |
name: ☁️ upload release to PyPI | |
runs-on: ubuntu-latest | |
needs: [check_build_trigger, unit_testing] | |
if: | | |
always() && | |
needs.check_build_trigger.outputs.build && | |
needs.unit_testing.result == 'success' | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pdm-project/setup-pdm@v3 | |
- name: Publish package distributions to PyPI | |
run: pdm publish |