Skip to content

Require Python 3.9 #299

Require Python 3.9

Require Python 3.9 #299

Workflow file for this run

name: Build
on:
push:
branches:
- "**"
tags:
- "v*"
pull_request:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
platform: darwin
arch: arm64
npm_config_arch: arm64
- os: macos-latest
platform: darwin
arch: x64
npm_config_arch: x64
- os: ubuntu-latest
platform: linux
arch: arm64
npm_config_arch: arm64
- os: ubuntu-latest
platform: linux
arch: x64
npm_config_arch: x64
- os: windows-latest
platform: win32
arch: arm64
npm_config_arch: arm64
- os: windows-latest
platform: win32
arch: x64
npm_config_arch: x64
runs-on: ${{ matrix.os }}
env:
PIP_ARCH: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: actions/setup-node@v3
with:
node-version: 20
- shell: bash
run: python -m pip install -U pip nox
- name: System runtime info
shell: bash
run: |
uname -a
arch
python -VV
python -c "import platform; print(platform.platform())"
python -c "import platform; print(platform.uname())"
python -m pip debug
- name: Download python wheels
shell: bash
run: |
nox --session download_wheels
- name: Bundle python packages
shell: bash
run: nox --session setup
- run: npm install
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
npm_config_arch: ${{ matrix.npm_config_arch }}
- shell: pwsh
run: |
echo "target=${{ matrix.platform }}-${{ matrix.arch }}" >> $env:GITHUB_ENV
echo "version=$(git describe)" >> $env:GITHUB_ENV
- run: npx @vscode/vsce package --out ufmt-${{ env.target }}-${{ env.version }}.vsix --target ${{ env.target }}
- uses: actions/upload-artifact@v3
with:
name: ${{ env.target }}
path: "*.vsix"
publish:
runs-on: ubuntu-latest
needs: build
if: success() && startsWith( github.ref, 'refs/tags/' )
steps:
- uses: actions/download-artifact@v3
- run: npx @vscode/vsce publish --packagePath $(find . -iname *.vsix)
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}