fix: switch releases to tag based workflow triggers

This commit is contained in:
Stefan
2026-06-25 19:52:29 +02:00
parent ec8428e0b4
commit 905184123f
10 changed files with 34 additions and 102 deletions
+2 -2
View File
@@ -47,11 +47,11 @@ runs:
echo "CARGO_PROFILE_RELEASE_CODEGEN_UNITS=16" >> "$GITHUB_ENV"
- name: Install sccache
if: ${{ inputs.sccache == 'true' }}
if: ${{ inputs.sccache == 'true' && github.ref_type != 'tag' }}
uses: mozilla-actions/sccache-action@v0.0.10
- name: Enable sccache
if: ${{ inputs.sccache == 'true' }}
if: ${{ inputs.sccache == 'true' && github.ref_type != 'tag' }}
shell: bash
run: |
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
+3 -2
View File
@@ -1,8 +1,9 @@
name: Benchmark
on:
release:
types: [ published ]
push:
tags:
- 'zen-engine-v*'
workflow_dispatch:
permissions:
+4 -13
View File
@@ -4,24 +4,15 @@ env:
MACOSX_DEPLOYMENT_TARGET: '10.13'
on:
push:
branches:
- master
tags-ignore:
- '**'
paths:
- 'bindings/c/**'
- 'core/**'
- 'test-data/**'
- '.github/workflows/go.yaml'
pull_request:
paths:
- 'bindings/c/**'
- 'core/**'
- 'test-data/**'
- '.github/workflows/go.yaml'
release:
types: [published]
push:
tags:
- 'go-v*'
permissions: write-all
@@ -112,7 +103,7 @@ jobs:
name: Release
runs-on: ubuntu-latest
environment: release
if: "github.event_name == 'release' && startsWith(github.event.release.tag_name, 'go-v')"
if: "github.ref_type == 'tag'"
needs:
- build
- copy-common
+5 -19
View File
@@ -9,34 +9,21 @@ env:
CARGO_TARGET_APPLIES_TO_HOST: false
on:
push:
branches:
- master
tags-ignore:
- '**'
paths:
- 'bindings/nodejs/**'
- 'core/**'
- 'test-data/**'
- '.github/workflows/node.yaml'
pull_request:
paths:
- 'bindings/nodejs/**'
- 'core/**'
- 'test-data/**'
- '.github/workflows/node.yaml'
# Stable publish is driven by the GitHub Release that release-please creates
# for the `nodejs` component (tag `nodejs-v<version>`).
release:
types: [ published ]
push:
tags:
- 'nodejs-v*'
permissions:
contents: write
jobs:
build:
# On release events, only build for this component's tag.
if: "(github.event_name != 'release' || startsWith(github.event.release.tag_name, 'nodejs-v')) && !contains(github.event.head_commit.message, 'skip ci')"
strategy:
fail-fast: false
matrix:
@@ -282,7 +269,7 @@ jobs:
runs-on: ubuntu-latest
environment: release
# Publishes only on the release-please GitHub Release for the nodejs component.
if: "github.event_name == 'release' && startsWith(github.event.release.tag_name, 'nodejs-v')"
if: "github.ref_type == 'tag'"
defaults:
run:
working-directory: ${{ env.WORKING_DIRECTORY }}
@@ -328,8 +315,7 @@ jobs:
shell: bash
- name: Lerna publish
# Prereleases (release-please beta window) go to the `next` dist-tag, not `latest`.
run: yarn lerna publish from-package --dist-tag ${{ github.event.release.prerelease && 'next' || 'latest' }} --no-verify-access --yes
run: yarn lerna publish from-package --dist-tag ${{ contains(github.ref, '-beta') && 'beta' || 'latest' }} --no-verify-access --yes
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+4 -17
View File
@@ -3,26 +3,15 @@ env:
WORKING_DIRECTORY: bindings/python
on:
push:
branches:
- master
tags-ignore:
- '**'
paths:
- 'bindings/python/**'
- 'core/**'
- 'test-data/**'
- '.github/workflows/python.yaml'
pull_request:
paths:
- 'bindings/python/**'
- 'core/**'
- 'test-data/**'
- '.github/workflows/python.yaml'
# Stable publish is driven by the GitHub Release that release-please creates
# for the `python` component (tag `python-v<version>`).
release:
types: [ published ]
push:
tags:
- 'python-v*'
permissions:
contents: read
@@ -31,7 +20,6 @@ jobs:
# The build jobs skip on release events for other components (release-please fires
# one `release` event per component; only `python-v*` should build/publish here).
wheels:
if: "github.event_name != 'release' || startsWith(github.event.release.tag_name, 'python-v')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
@@ -82,7 +70,6 @@ jobs:
path: dist
sdist:
if: "github.event_name != 'release' || startsWith(github.event.release.tag_name, 'python-v')"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
@@ -106,7 +93,7 @@ jobs:
runs-on: ubuntu-latest
environment: release
# Publishes only on the release-please GitHub Release for the python component.
if: "github.event_name == 'release' && startsWith(github.event.release.tag_name, 'python-v')"
if: "github.ref_type == 'tag'"
needs: [ wheels, sdist ]
steps:
- uses: actions/download-artifact@v4
+3 -15
View File
@@ -11,19 +11,8 @@ on:
- '.github/workflows/python.yaml'
- '.github/workflows/node.yaml'
push:
branches:
- master
tags-ignore:
- '**'
paths-ignore:
- 'bindings/**'
- 'examples/**'
- '.github/workflows/python.yaml'
- '.github/workflows/node.yaml'
# Crates.io publish is driven by the GitHub Release that release-please
# creates for the linked `core` group (anchored on tag `zen-engine-v<version>`).
release:
types: [published]
tags:
- 'zen-engine-v*'
env:
RUST_BACKTRACE: 1
@@ -72,8 +61,7 @@ jobs:
name: Cargo Release
runs-on: ubuntu-latest
environment: release
# Publishes only on the release-please GitHub Release for the core group.
if: "github.event_name == 'release' && startsWith(github.event.release.tag_name, 'zen-engine-v')"
if: "github.ref_type == 'tag'"
needs:
- test
- fmt
+11 -28
View File
@@ -3,30 +3,18 @@ env:
UNIFFI_DIRECTORY: bindings/uniffi
on:
push:
branches:
- master
tags-ignore:
- '**'
paths:
- 'bindings/uniffi/**'
- 'core/**'
- 'test-data/**'
- '.github/workflows/uniffi.yaml'
pull_request:
paths:
- 'bindings/uniffi/**'
- 'core/**'
- 'test-data/**'
- '.github/workflows/uniffi.yaml'
# Stable publish is driven by the GitHub Release that release-please creates
# for the `uniffi` component (tag `uniffi-v<version>`).
release:
types: [published]
push:
tags:
- 'uniffi-v*'
jobs:
build:
if: "!contains(github.event.head_commit.message, 'skip ci')"
env:
OUTPUT_NAME: zen_uniffi
@@ -100,7 +88,7 @@ jobs:
runs-on: ubuntu-latest
environment: release
needs: [ build ]
if: "github.event_name == 'release' && startsWith(github.event.release.tag_name, 'uniffi-v')"
if: "github.ref_type == 'tag'"
defaults:
run:
working-directory: ${{ env.UNIFFI_DIRECTORY }}
@@ -176,7 +164,7 @@ jobs:
needs: [ build ]
permissions:
id-token: write # Required for OIDC
if: "github.event_name == 'release' && startsWith(github.event.release.tag_name, 'uniffi-v')"
if: "github.ref_type == 'tag'"
defaults:
run:
working-directory: ${{ env.UNIFFI_DIRECTORY }}
@@ -255,7 +243,6 @@ jobs:
--skip-duplicate
build-ios:
if: "!contains(github.event.head_commit.message, 'skip ci')"
env:
OUTPUT_NAME: zen_uniffi
IPHONEOS_DEPLOYMENT_TARGET: '16.0'
@@ -306,7 +293,6 @@ jobs:
create-xcframework:
runs-on: macos-latest
needs: [ build-ios ]
if: "!contains(github.event.head_commit.message, 'skip ci')"
steps:
- uses: actions/checkout@v3
@@ -401,7 +387,7 @@ jobs:
runs-on: macos-latest
environment: release
needs: [ create-xcframework ]
if: "github.event_name == 'release' && startsWith(github.event.release.tag_name, 'uniffi-v')"
if: "github.ref_type == 'tag'"
steps:
- name: Checkout zen-ios
@@ -478,7 +464,6 @@ jobs:
--base "master"
build-android:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
env:
OUTPUT_NAME: zen_uniffi
@@ -504,7 +489,7 @@ jobs:
add-to-path: true
- name: Add Rust Android targets (all)
if: "github.event_name == 'release' && startsWith(github.event.release.tag_name, 'uniffi-v')"
if: "github.ref_type == 'tag'"
run: |
rustup target add aarch64-linux-android
rustup target add armv7-linux-androideabi
@@ -512,12 +497,12 @@ jobs:
rustup target add x86_64-linux-android
- name: Add Rust Android targets (arm64 only)
if: "github.event_name != 'release' || !startsWith(github.event.release.tag_name, 'uniffi-v')"
if: "github.ref_type != 'tag'"
run: |
rustup target add aarch64-linux-android
- name: Build for Android (all targets)
if: "github.event_name == 'release' && startsWith(github.event.release.tag_name, 'uniffi-v')"
if: "github.ref_type == 'tag'"
env:
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
@@ -527,7 +512,7 @@ jobs:
build -p zen-uniffi --release --locked --features bindgen
- name: Build for Android (arm64 only)
if: "github.event_name != 'release' || !startsWith(github.event.release.tag_name, 'uniffi-v')"
if: "github.ref_type != 'tag'"
env:
ANDROID_NDK_ROOT: ${{ steps.setup-ndk.outputs.ndk-path }}
run: |
@@ -546,7 +531,6 @@ jobs:
prepare-android-bindings:
runs-on: ubuntu-latest
needs: [ build ]
if: "!contains(github.event.head_commit.message, 'skip ci')"
defaults:
run:
@@ -584,7 +568,6 @@ jobs:
package-android-aar:
runs-on: ubuntu-latest
needs: [ build-android, prepare-android-bindings ]
if: "!contains(github.event.head_commit.message, 'skip ci')"
defaults:
run:
working-directory: ${{ env.UNIFFI_DIRECTORY }}
@@ -683,7 +666,7 @@ jobs:
runs-on: ubuntu-latest
environment: release
needs: [ package-android-aar ]
if: "github.event_name == 'release' && startsWith(github.event.release.tag_name, 'uniffi-v')"
if: "github.ref_type == 'tag'"
defaults:
run:
working-directory: ${{ env.UNIFFI_DIRECTORY }}
-1
View File
@@ -4,7 +4,6 @@
"core/types": "1.0.0-beta.0",
"core/template": "1.0.0-beta.0",
"core/macros": "1.0.0-beta.0",
"core/expression_repl": "1.0.0-beta.0",
"bindings/nodejs": "1.0.0-beta.0",
"bindings/python": "1.0.0-beta.0",
"bindings/uniffi": "1.0.0-beta.0",
+1 -1
View File
@@ -133,4 +133,4 @@ impl DecisionLoader for MemoryLoader {
}
}
}
```
```
+1 -4
View File
@@ -5,7 +5,6 @@
"tag-separator": "-",
"pull-request-title-pattern": "chore(release): publish${component}",
"group-pull-request-title-pattern": "chore(release): publish${component}",
"release-as": "1.0.0-beta.1",
"prerelease": true,
"prerelease-type": "beta",
"versioning": "prerelease",
@@ -26,8 +25,7 @@
"zen-expression",
"zen-types",
"zen-tmpl",
"zen-macros",
"expression_repl"
"zen-macros"
]
}
],
@@ -37,7 +35,6 @@
"core/types": { "release-type": "rust", "component": "zen-types" },
"core/template": { "release-type": "rust", "component": "zen-tmpl" },
"core/macros": { "release-type": "rust", "component": "zen-macros" },
"core/expression_repl": { "release-type": "rust", "component": "expression_repl" },
"bindings/nodejs": {
"release-type": "rust",
"component": "nodejs",