Skip to content

ci: run tests on macos 13 rather than latest #11440

ci: run tests on macos 13 rather than latest

ci: run tests on macos 13 rather than latest #11440

name: Create Pull Request Prerelease
on: pull_request
jobs:
build:
if: ${{ github.repository_owner == 'cloudflare' }}
name: Build & Publish a Prerelease to the Adhoc Registry
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
timeout-minutes: 30
steps:
- name: Checkout Repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/action-setup@v2
with:
version: 8.8.0
- name: Use Node.js 16.18
uses: actions/setup-node@v3
with:
node-version: 16.18
cache: "pnpm"
- name: Install NPM Dependencies
run: pnpm install --frozen-lockfile
- name: Build Miniflare
# `extract-runtime-versions.mjs` needs to be able to resolve `miniflare`, but we want to have the correct
# `package.json` versions when we build packages for packing
run: pnpm run build --filter miniflare
env:
CI_OS: ${{ runner.os }}
- name: Extract runtime versions
run: node .github/extract-runtime-versions.mjs # extract versions before modifying version to include commit hash
- name: Upload runtime versions
uses: actions/upload-artifact@v3
with:
name: runtime-versions.md
path: runtime-versions.md
- name: Expose ACTIONS_RUNTIME_TOKEN and ACTIONS_RESULTS_URL
# We use the `@actions/artifact` package in the prerelease scripts below.
# This is meant to be used from custom JavaScript actions, rather than
# workflow `run` steps. This means it expects `ACTIONS_RUNTIME_TOKEN`
# and `ACTIONS_RESULTS_URL` environment variables to be set. We'd like
# to retain separation between the different stages of pre-releasing,
# and easily pass environment variables to the build. Therefore, we use
# this stub action that exposes the `ACTIONS_RUNTIME_TOKEN` and
# `ACTIONS_RESULTS_URL` action-specific environment variables as
# `GITHUB_ACTIONS_RUNTIME_TOKEN` and `GITHUB_ACTIONS_RESULTS_URL` global
# environment variables. These can be passed via `env` to `run` steps
# that use `@actions/artifact`.
uses: ./.github/actions/expose-actions-variables
- name: Update versions and dependencies
run: node .github/prereleases/1-versions.mjs
- name: Build, pack, and upload packages
run: node .github/prereleases/2-build-pack-upload.mjs
env:
NODE_ENV: "production"
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
ALGOLIA_PUBLIC_KEY: ${{ secrets.ALGOLIA_PUBLIC_KEY }}
SENTRY_DSN: "https://9edbb8417b284aa2bbead9b4c318918b@sentry10.cfdata.org/583"
CI_OS: ${{ runner.os }}
# Required by the `@actions/artifact` package
ACTIONS_RUNTIME_TOKEN: ${{ env.GITHUB_ACTIONS_RUNTIME_TOKEN }}
ACTIONS_RESULTS_URL: ${{ env.GITHUB_ACTIONS_RESULTS_URL }}
- name: Build and upload prerelease comment
run: node .github/prereleases/3-comment.mjs
env:
# Required by the `@actions/artifact` package
ACTIONS_RUNTIME_TOKEN: ${{ env.GITHUB_ACTIONS_RUNTIME_TOKEN }}
ACTIONS_RESULTS_URL: ${{ env.GITHUB_ACTIONS_RESULTS_URL }}