add challenge mirror, verify, format functionality #125
Workflow file for this run
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: Build and Publish | |
on: | |
release: | |
types: [published] | |
pull_request: | |
types: [opened, reopened, edited, synchronize] | |
jobs: | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.11] | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
pip install poetry | |
poetry install | |
- name: Build package | |
run: poetry build | |
- uses: actions/upload-artifact@v2 | |
with: | |
path: | | |
./dist/*.tar.gz | |
- name: Publish to PYPI | |
env: | |
PYPI_TOKEN: ${{ secrets.PYPI_PASSWORD }} | |
if: ${{ github.event_name == 'release' && env.PYPI_TOKEN != null }} | |
run: | | |
poetry config pypi-token.pypi "$PYPI_TOKEN" | |
poetry publish |