Skip to content

Add github token

Add github token #16

Workflow file for this run

name: Build
on:
push:
branches: ['main']
pull_request:
branches: ['main']
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.13-dev']
build-host:
- 'arm64-apple-ios'
- 'arm64-apple-ios-simulator'
- 'x86_64-apple-ios-simulator'
steps:
- name: Checkout ${{ github.repository }}
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
id: py
with:
python-version: ${{ matrix.python-version }}
check-latest: true
- name: Set Python version information
id: py-ver
run: |
echo "long=$(python ./version.py long)" >> $GITHUB_OUTPUT
echo "short=$(python ./version.py short)" >> $GITHUB_OUTPUT
- name: Download Python ${{ matrix.python-version }} source code
run: >
gh release download
v${{ steps.py-ver.outputs.long }}
-A tar.gz
-O Python.tar.gz
env:
GH_TOKEN: ${{ github.token }}
- name: Extract Python source code archive
run: |
tar -xzf Python.tar.gz
- name: Add iOS/Resources/bin to PATH
working-directory: Python-${{ steps.py-ver.outputs.long }}
run: echo "$(pwd)/iOS/Resources/bin" >> $GITHUB_PATH
- name: Configure
working-directory: Python-${{ steps.py-ver.outputs.long }}
run: >
./configure
--enable-framework="./iOS/Frameworks/main/"
--host=${{ matrix.build-host }}
--build=arm64-apple-darwin
--with-build-python="${{ steps.py.outputs.python-path }}"
- name: Build Python.framework
working-directory: Python-${{ steps.py-ver.outputs.long }}
run: |
make
make install
- name: Create an archive
working-directory: Python-${{ steps.py-ver.outputs.long }}
run: >
tar -czf
./iOS/Frameworks/dist/Python.framework.tar.gz
./iOS/Frameworks/dist/Python.framework