Bump pypa/gh-action-pypi-publish from 1.9.0 to 1.10.3 #473
Workflow file for this run
This file contains 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: Build | |
on: [push, workflow_dispatch] | |
permissions: read-all | |
jobs: | |
delete-old-artifacts: | |
permissions: | |
actions: write | |
if: github.actor == 'calendulish' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
egress-policy: audit | |
- uses: calendulish/purge-artifacts-action@2e8a85a677ea67a31edfe3e348d9379ad7e26988 # v1.0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
expire-in: 0 | |
linux-build: | |
if: ${{ always() }} | |
needs: delete-old-artifacts | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- python-version: '3.12' | |
python-exec: /opt/python/cp312-cp312/bin/python | |
- python-version: '3.11' | |
python-exec: /opt/python/cp311-cp311/bin/python | |
- python-version: '3.10' | |
python-exec: /opt/python/cp310-cp310/bin/python | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3 | |
with: | |
image: quay.io/pypa/manylinux_2_28_x86_64 | |
options: -v ${{ github.workspace }}:/work -e TERM=$TERM | |
shell: bash | |
run: | | |
yum install epel-release -y | |
yum install aria2 -y | |
rm -f /usr/bin/python /bin/python | |
ln -s ${{ matrix.python-exec }} /usr/bin/python | |
python -m pip install -r requirements.txt | |
/work/tools/Linux/dist_script.sh | |
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 | |
with: | |
name: linux_${{ matrix.python-version }} | |
path: | | |
build/*.zip | |
dist/ | |
if-no-files-found: error | |
retention-days: 90 | |
if: github.actor == 'calendulish' | |
rpi-build: | |
if: ${{ always() }} | |
needs: delete-old-artifacts | |
runs-on: ubuntu-latest | |
name: Build ${{ matrix.arch }} ${{ matrix.python-version }} | |
strategy: | |
matrix: | |
include: | |
- arch: 'armv7' | |
distro: 'archarm_latest' | |
- arch: 'aarch64' | |
distro: 'archarm_latest' | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: uraimo/run-on-arch-action@b0ffb25eb00af00468375982384441f063da1741 # v2.7.2 | |
id: build | |
with: | |
arch: ${{ matrix.arch }} | |
distro: ${{ matrix.distro }} | |
setup: mkdir -p "${PWD}/artifacts" | |
dockerRunArgs: --volume "${PWD}/artifacts:/artifacts" | |
env: | | |
release_name: "stlib-RPI-${{ matrix.arch }}" | |
shell: /bin/sh | |
run: | | |
pacman -Syu --noconfirm | |
pacman -S --noconfirm python python-build tar | |
python -m build --sdist --wheel | |
pushd build | |
mv lib.linux* "${release_name}" | |
tar -vvcf "${release_name}.zip" "${release_name}" | |
popd | |
cp -rfv build/ /artifacts/ | |
cp -rfv dist/ /artifacts/ | |
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 | |
with: | |
name: rpi_${{ matrix.arch }} | |
path: | | |
artifacts/build/*.zip | |
artifacts/dist/ | |
if-no-files-found: error | |
retention-days: 90 | |
if: github.actor == 'calendulish' | |
windows-build: | |
if: ${{ always() }} | |
needs: delete-old-artifacts | |
runs-on: windows-2022 | |
strategy: | |
matrix: | |
python-version: ['3.10', '3.11', '3.12'] | |
defaults: | |
run: | |
shell: cmd | |
working-directory: .\\tools\Windows | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: python -m pip install -r .\\..\..\requirements.txt | |
- run: dist_script_native.cmd | |
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 | |
with: | |
name: windows_${{ matrix.python-version }} | |
path: | | |
build/*.zip | |
dist/ | |
if-no-files-found: error | |
retention-days: 90 | |
if: github.actor == 'calendulish' | |
msys-build: | |
if: ${{ always() }} | |
needs: delete-old-artifacts | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: cmd | |
working-directory: .\\tools\Windows | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- run: update_dev_environment.cmd | |
- run: python -m pip install -r .\\..\..\requirements.txt | |
- run: dist_script.cmd | |
- uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 | |
with: | |
name: msys | |
path: | | |
build/*.zip | |
dist/ | |
if-no-files-found: error | |
retention-days: 90 | |
if: github.actor == 'calendulish' | |
deploy: | |
permissions: | |
contents: write # for softprops/action-gh-release to create GitHub release | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: [linux-build, rpi-build, windows-build, msys-build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
- uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8 | |
with: | |
draft: true | |
files: | | |
linux_3.9/dist/*.whl | |
linux_3.10/dist/*.whl | |
linux_3.11/dist/*.whl | |
linux_3.12/dist/*.whl | |
windows_3.9/dist/*.whl | |
windows_3.10/dist/*.whl | |
windows_3.11/dist/*.whl | |
windows_3.12/dist/*.whl | |
rpi_aarch64/dist/*.whl | |
rpi_armv7/dist/*.whl | |
msys/dist/*.whl | |
pypi-upload: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: [deploy] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 | |
with: | |
python-version: '3.12' | |
- run: python -m pip install -r dev-requirements.txt | |
- run: python -m auditwheel repair --exclude libsteam_api.so --plat manylinux_2_28_x86_64 linux_3.12/dist/stlib-*cp312*.whl | |
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 | |
with: | |
python-version: '3.11' | |
- run: python -m pip install -r dev-requirements.txt | |
- run: python -m auditwheel repair --exclude libsteam_api.so --plat manylinux_2_28_x86_64 linux_3.11/dist/stlib-*cp311*.whl | |
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 | |
with: | |
python-version: '3.10' | |
- run: python -m pip install -r dev-requirements.txt | |
- run: python -m auditwheel repair --exclude libsteam_api.so --plat manylinux_2_28_x86_64 linux_3.10/dist/stlib-*cp310*.whl | |
- run: mv windows_3.10/dist/stlib-*win_amd64.whl wheelhouse/ | |
- run: mv windows_3.11/dist/stlib-*win_amd64.whl wheelhouse/ | |
- run: mv windows_3.12/dist/stlib-*win_amd64.whl wheelhouse/ | |
- run: mv linux_3.12/dist/stlib-*.tar.gz wheelhouse/ | |
- uses: pypa/gh-action-pypi-publish@f7600683efdcb7656dec5b29656edb7bc586e597 # release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
packages-dir: wheelhouse/ | |
verbose: true | |
print-hash: true | |
generate-badges: | |
permissions: | |
contents: write | |
if: ${{ always() && github.actor == 'calendulish' }} | |
needs: [linux-build, rpi-build, windows-build, msys-build] | |
runs-on: ubuntu-latest | |
env: | |
linux-badge-color: ${{ needs.linux-build.result == 'success' && 'green' || 'red' }} | |
windows-badge-color: ${{ needs.windows-build.result == 'success' && 'green' || 'red' }} | |
rpi-badge-color: ${{ needs.rpi-build.result == 'success' && 'green' || 'red' }} | |
msys-badge-color: ${{ needs.msys-build.result == 'success' && 'green' || 'red' }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@5c7944e73c4c2a096b17a9cb74d65b6c2bbafbde # v2.9.1 | |
with: | |
egress-policy: audit | |
- uses: RubbaBoy/BYOB@24f464284c1fd32028524b59607d417a2e36fee7 # v1.3.0 | |
with: | |
NAME: stlib-linux-build | |
LABEL: 'Linux build' | |
STATUS: ${{ needs.linux-build.result }} | |
COLOR: ${{ env.linux-badge-color }} | |
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }} | |
REPOSITORY: calendulish/.github | |
ACTOR: calendulish | |
- uses: RubbaBoy/BYOB@24f464284c1fd32028524b59607d417a2e36fee7 # v1.3.0 | |
with: | |
NAME: stlib-rpi-build | |
LABEL: 'RPI build' | |
STATUS: ${{ needs.rpi-build.result }} | |
COLOR: ${{ env.rpi-badge-color }} | |
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }} | |
REPOSITORY: calendulish/.github | |
ACTOR: calendulish | |
- uses: RubbaBoy/BYOB@24f464284c1fd32028524b59607d417a2e36fee7 # v1.3.0 | |
with: | |
NAME: stlib-windows-build | |
LABEL: 'Windows build' | |
STATUS: ${{ needs.windows-build.result }} | |
COLOR: ${{ env.windows-badge-color }} | |
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }} | |
REPOSITORY: calendulish/.github | |
ACTOR: calendulish | |
- uses: RubbaBoy/BYOB@24f464284c1fd32028524b59607d417a2e36fee7 # v1.3.0 | |
with: | |
NAME: stlib-msys-build | |
LABEL: 'Msys build' | |
STATUS: ${{ needs.msys-build.result }} | |
COLOR: ${{ env.msys-badge-color }} | |
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }} | |
REPOSITORY: calendulish/.github | |
ACTOR: calendulish |