Skip to content

v3.4.7: More Ally Fixes #37

v3.4.7: More Ally Fixes

v3.4.7: More Ally Fixes #37

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,ecdsa,ed25519
deploy_copr:
runs-on: ubuntu-latest
environment: prod
needs: deploy_pypi
steps:
- uses: actions/checkout@v3
- name: Create spec file dir
run: mkdir -p ./pkg/
- name: Build spec file
run: sed "s/REPLACE_VERSION/$(cat pyproject.toml | grep -E 'version = "[0-9\.]+"' -o | grep -E "[0-9\.]+" -o)/" adjustor.spec > ./pkg/adjustor.spec
- name: Publish to COPR repo
uses: s0/git-publish-subdir-action@develop
env:
REPO: [email protected]:hhd-dev/adjustor-copr.git
BRANCH: main
FOLDER: pkg
SSH_PRIVATE_KEY: ${{ secrets.COPR_SSH_PRIVATE_KEY }}
MESSAGE: update to '${{ github.event.release.name }}'
SKIP_EMPTY_COMMITS: true
# Do not clear any files
CLEAR_GLOBS_FILE: .github/workflows/copr_glob.txt