Update gvsbuild stack and allow releases using both a newer stack, as well as using the latest versions that still support python 3.7. #22
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: Release | ||
# Controls when the workflow will run | ||
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
inputs: | ||
fork: | ||
description: "Enter a gvsbuild fork for the build with the latest stack, defaults to wingtk." | ||
default: "wingtk" | ||
ref: | ||
description: "Enter a git ref for checking out the above repository, defaults to main." | ||
default: "main" | ||
jobs: | ||
build: | ||
runs-on: windows-2022 | ||
strategy: | ||
matrix: | ||
python: ["3.9", "3.10"] | ||
platform: [x64, win32] | ||
vstudio: [17] | ||
fork: [${{ github.event.inputs.fork }}] | ||
ref: [${{ github.event.inputs.ref }}] | ||
include: | ||
- fork: "Lord-Kamina" | ||
ref: "older" | ||
python: "3.7" | ||
- platform: x64 | ||
arch: x64 | ||
- platform: win32 | ||
arch: x86 | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ matrix.fork }}/gvsbuild | ||
fetch-depth: 0 | ||
ref: ${{ matrix.ref }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
architecture: ${{ matrix.arch }} | ||
- name: Install Build Deps | ||
run: python -m pip install wheel build | ||
- name: Install gvsbuild tool | ||
run: python -m pip install . | ||
- name: Move git binary | ||
# Temporarily move preinstalled git to prevent errors related to cygwin. | ||
run: Rename-Item "C:\Program Files\Git\usr\bin" notbin | ||
- name: Build | ||
run: > | ||
gvsbuild build | ||
--platform=${{ matrix.arch }} | ||
--vs-ver=${{ matrix.vstudio }} | ||
--enable-gi | ||
--py-wheel | ||
--patches-root-dir=${{ github.workspace }}\gvsbuild\patches | ||
gtk3 pycairo pygobject wing lz4 enchant hicolor-icon-theme adwaita-icon-theme | ||
- name: Restore git binary | ||
run: Rename-Item "C:\Program Files\Git\usr\notbin" bin | ||
- name: Zip Bundle | ||
run: > | ||
7z a | ||
${{ github.workspace }}/${{ env.release_name }}.zip | ||
"C:\gtk-build\gtk\${{matrix.platform}}\release" | ||
env: | ||
release_name: "gvsbuild-py${{ matrix.python }}-vs${{ matrix.vstudio }}-${{ matrix.arch }}" | ||
- name: Current Date | ||
id: date | ||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
name: release | ||
tag_name: release-${{ steps.date.outputs.date }} | ||
body: gvsbuild-${{ steps.date.outputs.date }} | ||
files: "*.zip" |