Skip to content

v3.5.9: MSI Claw hotfix #101

v3.5.9: MSI Claw hotfix

v3.5.9: MSI Claw hotfix #101

Workflow file for this run

name: Publish to PyPi, AUR, COPR
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 babel
- name: Generate mo files
run: |
pybabel compile -D hhd -d ./i18n
pybabel compile -D adjustor -d ./i18n
/bin/cp -rf ./i18n/* ./src/hhd/i18n
- 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/github-actions-deploy-aur@v2.7.0
with:
pkgname: hhd
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
updpkgsums: true
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)/" hhd.spec > ./pkg/hhd.spec
- name: Publish to COPR repo
uses: s0/git-publish-subdir-action@develop
env:
REPO: git@github.com:hhd-dev/hhd-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