Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/benchmark.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Benchmark

on:
release:
types: [ published ]
push:
tags:
- 'zen-engine-v*'
workflow_dispatch:

permissions:
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down
24 changes: 5 additions & 19 deletions .github/workflows/node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
21 changes: 4 additions & 17 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
18 changes: 3 additions & 15 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
39 changes: 11 additions & 28 deletions .github/workflows/uniffi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -504,20 +489,20 @@ 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
rustup target add i686-linux-android
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: |
Expand All @@ -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: |
Expand All @@ -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:
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down
1 change: 0 additions & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion core/engine/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ impl DecisionLoader for MemoryLoader {
}
}
}
```
```
5 changes: 1 addition & 4 deletions release-please-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -26,8 +25,7 @@
"zen-expression",
"zen-types",
"zen-tmpl",
"zen-macros",
"expression_repl"
"zen-macros"
]
}
],
Expand All @@ -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",
Expand Down
Loading