pypilot/.github/workflows/publish.yml
dependabot[bot] e69b1e5be2 chore(actions)(deps): bump actions/checkout from 4.1.1 to 4.1.2
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.1 to 4.1.2.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](b4ffde65f4...9bb56186c3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-13 07:42:55 +00:00

54 lines
1.3 KiB
YAML

name: Publish
on:
push:
branches:
- "main"
paths-ignore:
- 'README.md'
- 'LICENSE.md'
- 'CHANGELOG.md'
- '.gitignore'
- 'renovate.json'
- 'CODEOWNERS'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install setuptools wheel
- name: Build wheel file
run: python setup.py bdist_wheel
- id: skip_check
uses: actions/upload-artifact@v4
with:
name: whl
path: dist/
publish:
needs: build
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
runs-on: ubuntu-latest
steps:
- name: Create dist folder
run: |
mkdir -p dist
- uses: actions/download-artifact@v4
with:
name: whl
path: dist
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}