mirror of
https://github.com/cloudflare/vinext.git
synced 2026-09-14 19:04:59 +08:00
6c33639d4b
Bumps [actions/checkout](https://github.com/actions/checkout) from 7.0.0 to 7.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0...3d3c42e5aac5ba805825da76410c181273ba90b1) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
67 lines
2.5 KiB
YAML
67 lines
2.5 KiB
YAML
name: Release
|
|
|
|
# Single release workflow. On every push to `main`:
|
|
# 1. create-changeset.mts writes auto changesets from Conventional Commits into
|
|
# the WORKING TREE only (never committed to main). Its version-vs-tag guard
|
|
# generates nothing right after a Version PR merges.
|
|
# 2. changesets/action does everything else — it maintains the rolling "Version
|
|
# Packages" PR while changesets exist, and when none exist (the PR just
|
|
# merged) it publishes via OIDC trusted publishing + provenance and creates
|
|
# the git tag + GitHub Release.
|
|
#
|
|
# `version:` runs scripts/version.mts (`changeset version` + the `## Contributors`
|
|
# list). `publish:` runs scripts/publish.mts, which publishes only changed packages
|
|
# and makes prerelease versions the default npm install via the `latest` dist-tag.
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
concurrency:
|
|
group: release
|
|
cancel-in-progress: false
|
|
|
|
permissions: {}
|
|
|
|
jobs:
|
|
release:
|
|
name: Release
|
|
if: github.repository_owner == 'cloudflare'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write # version PR branch, git tags, GitHub Releases
|
|
pull-requests: write # open / update the Version PR
|
|
id-token: write # npm OIDC trusted publishing + provenance
|
|
steps:
|
|
# zizmor: ignore[artipacked] persisted creds are required for
|
|
# changesets/action to push the Version PR branch, tags, and releases.
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: 0 # full history + tags for the guard and contributor list
|
|
|
|
- uses: ./.github/actions/setup
|
|
|
|
- name: Generate changesets from Conventional Commits
|
|
run: node scripts/create-changeset.mts
|
|
|
|
- name: Version PR / publish
|
|
id: changesets
|
|
uses: changesets/action@a45c4d594aa4e2c509dc14a9f2b3b67ba3780d0d # v1.9.0
|
|
with:
|
|
version: node scripts/version.mts
|
|
publish: node scripts/publish.mts
|
|
title: "chore: version packages"
|
|
commit: "chore: version packages"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
|
NPM_CONFIG_PROVENANCE: "true"
|
|
NPM_CONFIG_REGISTRY: https://registry.npmjs.org
|
|
|
|
- name: Promote beta GitHub Releases
|
|
if: steps.changesets.outputs.published == 'true'
|
|
run: node scripts/promote-github-prereleases.mts
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
PUBLISHED_PACKAGES: ${{ steps.changesets.outputs.published-packages }}
|