pypilot/.github/workflows/publish.yml
dependabot[bot] 88f8dd5d9c chore(actions)(deps): bump abatilo/actions-poetry from 2 to 3
Bumps [abatilo/actions-poetry](https://github.com/abatilo/actions-poetry) from 2 to 3.
- [Release notes](https://github.com/abatilo/actions-poetry/releases)
- [Changelog](https://github.com/abatilo/actions-poetry/blob/master/.releaserc)
- [Commits](https://github.com/abatilo/actions-poetry/compare/v2...v3)

---
updated-dependencies:
- dependency-name: abatilo/actions-poetry
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 07:26:34 +01:00

56 lines
1.4 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@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Setup Poetry
uses: abatilo/actions-poetry@v3
- name: Install dependencies
run: poetry install
- name: Build wheel file
run: poetry build
- 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
# Specifying a GitHub environment is optional, but strongly encouraged
environment:
name: release
url: https://pypi.org/p/ipilot
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
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