Version Packages #127
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vercel/ai uses https://github.com/changesets/changesets for versioning and changelogs, | |
# but is not following semantic versioning. Instead, it uses `patch` for both fixes | |
# and features. It uses `minor` for "marketing releases", accompanied by a blog post and migration guide. | |
# This workflow verifies that all `.changeset/*.md` files use `patch` unless a `minor-release` label is present. | |
name: Verify Changesets | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened, labeled, unlabeled] | |
branches: | |
- main | |
paths: | |
- '.changeset/*.md' | |
permissions: | |
contents: read | |
pull-requests: read | |
jobs: | |
verify-changesets: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Generate GitHub App Token | |
id: generate-token | |
uses: actions/create-github-app-token@v1 | |
with: | |
app-id: ${{ secrets.STREAMDOWN_APP_ID }} | |
private-key: ${{ secrets.STREAMDOWN_APP_PRIVATE_KEY }} | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ steps.generate-token.outputs.token }} | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 'lts/*' | |
- name: get all changed files from .changeset/*.md | |
id: changeset-files | |
run: | | |
echo "changed-files=$(git diff --diff-filter=dr --name-only $BASE_SHA -- '.changeset/*.md' | tr '\n' ' ')" >> $GITHUB_OUTPUT | |
env: | |
BASE_SHA: ${{ github.event.pull_request.base.sha }} | |
- name: Verify changesets | |
if: steps.changeset-files.outputs.changed-files != '' | |
working-directory: .github/workflows/actions/verify-changesets | |
run: | | |
node index.js | |
env: | |
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} | |
CHANGED_FILES: ${{ steps.changeset-files.outputs.changed-files }} |