Update username (#4) #18
This file contains hidden or 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: ci | |
| on: | |
| push: | |
| branch: | |
| jobs: | |
| lint_test: | |
| name: Lint & Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: automas-dev/reusable-workflows/setup_python@main | |
| with: | |
| python-version: "3.12" | |
| poetry-version: "1.8.5" | |
| - name: Install Dependencies | |
| run: poetry install | |
| - name: Lint | |
| run: poetry run ruff check . | |
| # - name: Test | |
| # run: poetry run pytest tests --cov=src --cov-branch --cov-fail-under=100 | |
| build_release: | |
| name: Build Release | |
| runs-on: ubuntu-latest | |
| if: github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'NO RELEASE') | |
| needs: lint_test | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Increment Version | |
| uses: automas-dev/reusable-workflows/increment_version@main | |
| id: version | |
| - name: Setup Python | |
| uses: automas-dev/reusable-workflows/setup_python@main | |
| with: | |
| python-version: "3.12" | |
| poetry-version: "1.8.5" | |
| - name: Install Dependencies | |
| run: poetry install | |
| - name: Set version | |
| env: | |
| VERSION: ${{ steps.version.outputs.version }} | |
| run: | | |
| poetry version $VERSION | |
| - name: Build Release | |
| run: | | |
| poetry build | |
| - name: Create Release | |
| uses: ncipollo/[email protected] | |
| with: | |
| artifacts: "dist/*.whl" | |
| makeLatest: true | |
| generateReleaseNotes: true | |
| tag: ${{ steps.version.outputs.version }} | |
| - name: Publish Package | |
| env: | |
| PYPI_TOKEN: ${{ secrets.PYPI_KEY }} | |
| run: | | |
| poetry config pypi-token.pypi $PYPI_TOKEN | |
| poetry publish |