Skip to content

Commit

Permalink
Fix @cloudflare/workers-types version (#3405)
Browse files Browse the repository at this point in the history
* Update release.yml

* Update release.yml

* Update release.yml
  • Loading branch information
penalosa authored Jan 24, 2025
1 parent aefa11f commit c057297
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,24 @@ on:
push:
branches:
- main
workflow_dispatch:
inputs:
patch:
description: 'Patch Version'
required: true
default: '0'
prerelease:
description: 'Is Prerelease'
type: boolean
default: false


jobs:
version:
outputs:
date: ${{ steps.echo.outputs.date }}
version: ${{ steps.echo.outputs.version }}
release_version: ${{ steps.echo.outputs.release_version }}
types_version: ${{ steps.echo.outputs.types_version }}
# version job uses ubuntu 24.04, this way we don't have to install the updated clang while
# the build job uses 22.04 for libc compatibility.
runs-on: ubuntu-24.04
Expand All @@ -19,8 +30,8 @@ jobs:
- id: echo
run: |
echo "date=$(cat src/workerd/io/supported-compatibility-date.txt)" >> $GITHUB_OUTPUT;
echo "version=1.$(cat src/workerd/io/supported-compatibility-date.txt | tr -d '-').0" >> $GITHUB_OUTPUT;
echo "release_version=1.$(cat src/workerd/io/supported-compatibility-date.txt | tr -d '-').0" >> $GITHUB_OUTPUT;
echo "version=${{ (github.event.action != 'push' && inputs.prerelease == true) && '0' || '1'}}.$(cat src/workerd/io/supported-compatibility-date.txt | tr -d '-').${{ github.event.action == 'push' && '0' || inputs.patch }}" >> $GITHUB_OUTPUT;
echo "types_version=${{ (github.event.action != 'push' && inputs.prerelease == true) && '0' || '4'}}.$(cat src/workerd/io/supported-compatibility-date.txt | tr -d '-').${{ github.event.action == 'push' && '0' || inputs.patch }}" >> $GITHUB_OUTPUT;
check-tag:
name: Check tag is new
outputs:
Expand Down Expand Up @@ -355,7 +366,7 @@ jobs:
- name: Build package
run: node npm/scripts/build-types-package.mjs
env:
WORKERD_VERSION: ${{ needs.version.outputs.version }}
WORKERD_VERSION: ${{ needs.version.outputs.types_version }}
LATEST_COMPATIBILITY_DATE: ${{ needs.version.outputs.date }}
- run: cp -r bazel-bin/types/definitions/. npm/workers-types
- run: cp npm/workers-types/oldest/* npm/workers-types
Expand Down

0 comments on commit c057297

Please # to comment.