Skip to content

ci(deps): update pypa/gh-action-pypi-publish action to v1.8.10 #136

ci(deps): update pypa/gh-action-pypi-publish action to v1.8.10

ci(deps): update pypa/gh-action-pypi-publish action to v1.8.10 #136

Workflow file for this run

name: Main
on:
push:
branches: [main]
pull_request:
branches: [main]
release:
types: [created]
permissions:
contents: read
jobs:
lint:
name: Lint code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
cache: poetry
- name: Install deps
run: poetry install
- name: Lint code
run: poetry run poe lint
tests:
name: Tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: poetry
- name: Install deps
run: poetry install
- name: Run tests
run: poetry run poe test
env:
UPLOADCARE_KEY: ${{ secrets.UPLOADCARE_KEY }}
- name: Upload coverage to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11'
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
publish-pypi:
name: Release to PyPI
if: github.event_name == 'release' && github.event.action == 'created'
needs: [lint, tests]
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: |
pipx install poetry
pipx inject poetry poetry-dynamic-versioning[plugin]
- uses: actions/setup-python@v4
- name: Build package
run: poetry build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e # v1.8.10
publish-aur:
name: Release to AUR
if: github.event.release.prerelease != true
needs: [publish-pypi]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update version
run: |
VERSION="${GITHUB_REF#refs/tags/v}"
sed -i "s|\(^pkgver=\).*$|\1\"${VERSION}\"|" ./PKGBUILD
- name: Deploy PKGBUILD to the Arch User Repository
uses: KSXGitHub/github-actions-deploy-aur@063daf78a56662642bb00049ce78425ff6d0fad7 # v2.7.0
with:
pkgname: python-images-upload-cli
pkgbuild: ./PKGBUILD
commit_username: DeadNews
commit_email: [email protected]
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: Upstream release ${{ github.ref }}
updpkgsums: true