Bump github/codeql-action from 2.21.9 to 2.22.1 #221
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] | |
jobs: | |
delete-old-artifacts: | |
if: github.actor == 'calendulish' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
egress-policy: audit | |
- uses: calendulish/purge-artifacts-action@7f45b429560cfdf0ae26758e1b069b806489e094 # v1.0 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
expire-in: 0 | |
linux-build: | |
if: ${{ always() }} | |
needs: delete-old-artifacts | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.9', '3.10', '3.11'] | |
name: Python ${{ matrix.python-version }} linux build | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: sudo apt-fast -y install gettext | |
- run: python -m pip install build | |
- run: python -m build | |
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
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@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
- uses: uraimo/run-on-arch-action@213f9061987de116e4221ec1ea239a9fc61c4102 # v2 | |
id: build | |
with: | |
arch: ${{ matrix.arch }} | |
distro: ${{ matrix.distro }} | |
setup: mkdir -p "${PWD}/artifacts" | |
dockerRunArgs: --volume "${PWD}/artifacts:/artifacts" | |
env: | | |
release_name: "steam-tools-ng-RPI-${{ matrix.arch }}" | |
shell: /bin/sh | |
run: | | |
pacman -Syu --noconfirm | |
pacman -S --noconfirm python python-build tar | |
python -m build | |
cp -rfv dist/ /artifacts/ | |
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
with: | |
name: rpi_${{ matrix.arch }} | |
path: | | |
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'] | |
defaults: | |
run: | |
shell: cmd | |
working-directory: .\\tools\Windows | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: python -m pip install certifi aiohttp cx_freeze pywin32 psutil stlib stlib-plugins | |
- run: dist_script_native.cmd | |
- uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3 | |
with: | |
name: windows_${{ matrix.python-version }} | |
path: | | |
build/*.zip | |
installer/build/*.exe | |
if-no-files-found: error | |
retention-days: 90 | |
if: github.actor == 'calendulish' | |
deploy: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: [linux-build, windows-build, rpi-build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
- uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v1 | |
with: | |
draft: true | |
files: | | |
linux_3.11/dist/* | |
windows_3.11/installer/build/*.exe | |
windows_3.10/build/*.zip | |
windows_3.11/build/*.zip | |
rpi_aarch64/dist/*.whl | |
rpi_armv7/dist/*.whl | |
pypi-upload: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: [deploy] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ '3.11' ] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2 | |
- uses: pypa/gh-action-pypi-publish@b7f401de30cb6434a1e19f805ff006643653240e # release/v1 | |
with: | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
packages_dir: linux_${{ matrix.python-version }}/dist/ | |
verbose: true | |
print_hash: true | |
generate-badges: | |
if: ${{ always() && github.actor == 'calendulish' }} | |
needs: [linux-build, windows-build, rpi-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' }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@1b05615854632b887b69ae1be8cbefe72d3ae423 # v2.6.0 | |
with: | |
egress-policy: audit | |
- uses: RubbaBoy/BYOB@24f464284c1fd32028524b59607d417a2e36fee7 # v1.3.0 | |
with: | |
NAME: steam-tools-ng-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: steam-tools-ng-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: steam-tools-ng-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 |