|
3 | 3 | release: |
4 | 4 | types: [published] |
5 | 5 | jobs: |
6 | | - package: |
| 6 | + # Use an older Linux: https://pyinstaller.org/en/stable/usage.html#making-gnu-linux-apps-forward-compatible |
| 7 | + # Ubuntu 20.04 isn't supported by GitHub Actions. |
| 8 | + package-linux: |
| 9 | + runs-on: ubuntu-latest |
| 10 | + container: |
| 11 | + image: ubuntu:20.04 |
| 12 | + steps: |
| 13 | + # include binutils, pyinstaller needs objdump |
| 14 | + - name: Install dependencies |
| 15 | + run: | |
| 16 | + apt-get update |
| 17 | + apt-get install -y git zip curl binutils |
| 18 | +
|
| 19 | + - name: Install uv |
| 20 | + run: | |
| 21 | + curl -LsSf https://astral.sh/uv/install.sh | sh |
| 22 | +
|
| 23 | + # the checkout action has to be after a newer version of git is installed |
| 24 | + # see https://github.com/actions/checkout/issues/335. we need the git directory |
| 25 | + # for setuptools-scm to work. |
| 26 | + - uses: actions/checkout@v3 |
| 27 | + |
| 28 | + # the setup-python action doesn't work due to the older version of glibc |
| 29 | + # see https://github.com/actions/setup-python/issues/1053 |
| 30 | + - name: Set up Python |
| 31 | + run: | |
| 32 | + uv python install 3.10 |
| 33 | + ln -s $(uv python find 3.10) /usr/bin/python |
| 34 | + ln -s $(dirname $(uv python find 3.10))/pip /usr/bin/pip |
| 35 | +
|
| 36 | + - name: Run packaging step |
| 37 | + run: | |
| 38 | + uvx tox -e package |
| 39 | +
|
| 40 | + - name: Install GitHub CLI |
| 41 | + run: | |
| 42 | + curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg |
| 43 | + echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null |
| 44 | + apt-get update |
| 45 | + apt-get install -y gh |
| 46 | +
|
| 47 | + # this is needed when building in docker since the repo is cloned as root. |
| 48 | + # see https://stackoverflow.com/questions/73408170/git-fatal-detected-dubious-ownership |
| 49 | + - name: Allow git to run against root owned files |
| 50 | + run: | |
| 51 | + git config --global --add safe.directory $(pwd) |
| 52 | +
|
| 53 | + - name: Zip and upload binary |
| 54 | + run: | |
| 55 | + .github/zip_and_upload_package.sh Linux ${{ github.event.release.tag_name }} |
| 56 | + shell: bash |
| 57 | + env: |
| 58 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 59 | + |
| 60 | + package-macos-windows: |
7 | 61 | runs-on: ${{ matrix.os }} |
8 | 62 | strategy: |
9 | 63 | matrix: |
10 | 64 | os: |
11 | | - # Use an older Linux: https://pyinstaller.org/en/stable/usage.html#making-gnu-linux-apps-forward-compatible |
12 | | - - ubuntu-20.04 |
13 | 65 | - macos-latest |
14 | 66 | - windows-latest |
15 | 67 | steps: |
|
0 commit comments