Skip to content

v0.0.1: stub release #1

v0.0.1: stub release

v0.0.1: stub release #1

Workflow file for this run

name: Publish to PyPi, AUR
on:
workflow_dispatch:
release:
types: [published]
permissions:
contents: read
jobs:
deploy_pypi:
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build -s
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Sleep for 15 minutes
run: sleep 900s
shell: bash
deploy_aur:
runs-on: ubuntu-latest
environment: prod
needs: deploy_pypi
steps:
- uses: actions/checkout@v3
- name: Create PKGBUILD dir
run: mkdir -p ./pkg/
- name: Build PKGBUILD
run: sed "s/pkgver=VERSION/pkgver=$(cat pyproject.toml | grep -E 'version = "[0-9\.]+"' -o | grep -E "[0-9\.]+" -o)/" PKGBUILD > ./pkg/PKGBUILD
- name: Publish AUR package
uses: KSXGitHub/[email protected]
with:
pkgname: adjustor
pkgbuild: ./pkg/PKGBUILD
commit_username: ${{ secrets.AUR_USERNAME }}
commit_email: ${{ secrets.AUR_EMAIL }}
ssh_private_key: ${{ secrets.AUR_SSH_PRIVATE_KEY }}
commit_message: update to '${{ github.event.release.name }}'
allow_empty_commits: false
ssh_keyscan_types: rsa,dsa,ecdsa,ed25519