diff --git a/.github/actions/setup-rust/action.yml b/.github/actions/setup-rust/action.yml index 113ba86c..395c22b5 100644 --- a/.github/actions/setup-rust/action.yml +++ b/.github/actions/setup-rust/action.yml @@ -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" diff --git a/.github/workflows/benchmark.yaml b/.github/workflows/benchmark.yaml index 7454a77a..d5193f19 100644 --- a/.github/workflows/benchmark.yaml +++ b/.github/workflows/benchmark.yaml @@ -1,8 +1,9 @@ name: Benchmark on: - release: - types: [ published ] + push: + tags: + - 'zen-engine-v*' workflow_dispatch: permissions: diff --git a/.github/workflows/go.yaml b/.github/workflows/go.yaml index 9b3d9e81..a20f9c79 100644 --- a/.github/workflows/go.yaml +++ b/.github/workflows/go.yaml @@ -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 diff --git a/.github/workflows/node.yaml b/.github/workflows/node.yaml index 5dd84a37..65274ccf 100644 --- a/.github/workflows/node.yaml +++ b/.github/workflows/node.yaml @@ -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`). - 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 }} diff --git a/.github/workflows/python.yaml b/.github/workflows/python.yaml index 7bd3fdd4..f448b413 100644 --- a/.github/workflows/python.yaml +++ b/.github/workflows/python.yaml @@ -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`). - 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 diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index 66e733eb..e9ef7f2b 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -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`). - 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 diff --git a/.github/workflows/uniffi.yaml b/.github/workflows/uniffi.yaml index 212147f0..7b6654b0 100644 --- a/.github/workflows/uniffi.yaml +++ b/.github/workflows/uniffi.yaml @@ -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`). - 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 }} diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d1907bb1..d5fc96cd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -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", diff --git a/core/engine/README.md b/core/engine/README.md index 9cdba3d3..9fb8632c 100644 --- a/core/engine/README.md +++ b/core/engine/README.md @@ -133,4 +133,4 @@ impl DecisionLoader for MemoryLoader { } } } -``` \ No newline at end of file +``` diff --git a/release-please-config.json b/release-please-config.json index e3fcfbbc..79f51585 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -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",