v4.0.1: Fix License quirk #202
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 || true | |
| pybabel compile -D adjustor -d ./i18n || true | |
| /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 }} | |
| deploy_aur: | |
| runs-on: ubuntu-latest | |
| environment: prod | |
| needs: deploy_pypi | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Copy PKGBUILD | |
| run: | | |
| mkdir -p ./pkg | |
| cp ./PKGBUILD ./pkg/PKGBUILD | |
| - name: Publish AUR package | |
| uses: KSXGitHub/[email protected] | |
| 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 |