Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 37 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
restore-keys: |
flet-cache-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python_version }}-
flet-cache-${{ runner.os }}-${{ runner.arch }}-
# Read-only on tag/release builds to avoid cache poisoning.
# Avoid release-time cache poisoning.
lookup-only: ${{ startsWith(github.ref, 'refs/tags/') }}

- name: Configure ${{ matrix.build_system }}
Expand Down Expand Up @@ -170,7 +170,7 @@
restore-keys: |
flet-cache-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python_version }}-
flet-cache-${{ runner.os }}-${{ runner.arch }}-
# Read-only on tag/release builds to avoid cache poisoning.
# Avoid release-time cache poisoning.
lookup-only: ${{ startsWith(github.ref, 'refs/tags/') }}

- name: Setup iOS Simulator
Expand Down Expand Up @@ -254,7 +254,7 @@
restore-keys: |
flet-cache-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python_version }}-
flet-cache-${{ runner.os }}-${{ runner.arch }}-
# Read-only on tag/release builds to avoid cache poisoning.
# Avoid release-time cache poisoning.
lookup-only: ${{ startsWith(github.ref, 'refs/tags/') }}

- name: Enable KVM
Expand All @@ -270,7 +270,7 @@
# v5 was the last fully MIT-licensed major and is on Node 24.
uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
with:
# Disable the Gradle cache on tag/release builds to avoid cache poisoning.
# Avoid release-time cache poisoning.
cache-disabled: ${{ startsWith(github.ref, 'refs/tags/') }}

- name: AVD cache
Expand All @@ -281,7 +281,7 @@
~/.android/avd/*
~/.android/adb*
key: avd-bridge
# Read-only on tag/release builds to avoid cache poisoning.
# Avoid release-time cache poisoning.
lookup-only: ${{ startsWith(github.ref, 'refs/tags/') }}

- name: Setup Android Emulator + Run tests
Expand Down Expand Up @@ -362,7 +362,7 @@
restore-keys: |
flet-cache-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python_version }}-
flet-cache-${{ runner.os }}-${{ runner.arch }}-
# Read-only on tag/release builds to avoid cache poisoning.
# Avoid release-time cache poisoning.
lookup-only: ${{ startsWith(github.ref, 'refs/tags/') }}

- name: Package + run integration test
Expand Down Expand Up @@ -537,8 +537,7 @@
- name: Setup uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
# Publish runs on tags; disable the uv cache there to avoid
# release-time cache poisoning.
# Avoid release-time cache poisoning.
enable-cache: ${{ !startsWith(github.ref, 'refs/tags/') }}

- name: Setup Flutter
Expand Down Expand Up @@ -607,3 +606,33 @@
publish_pkg src/serious_python_linux
sleep 600
publish_pkg src/serious_python

release:
name: Publish GitHub Release
needs:
- publish
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
permissions:
contents: write
steps:
- name: Detect pre-release
id: prerelease
# Dart/pub pre-releases carry a semver hyphen suffix (e.g. v1.2.0-beta.1);
# mark those as GitHub pre-releases.
env:
REF_NAME: ${{ github.ref_name }}
run: |
if [[ "$REF_NAME" == *-* ]]; then
echo "is_prerelease=true" >> "$GITHUB_OUTPUT"
else
echo "is_prerelease=false" >> "$GITHUB_OUTPUT"
fi

- name: Create GitHub Release
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1

Check notice

Code scanning / zizmor

action functionality is already included by the runner: use gh release in a script step Note

action functionality is already included by the runner: use gh release in a script step
with:
name: ${{ github.ref_name }}
tag_name: ${{ github.ref_name }}
prerelease: ${{ steps.prerelease.outputs.is_prerelease == 'true' }}
generate_release_notes: true
Loading