Skip to content

chore: update preview release workflow to use snapshots #5365

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
May 7, 2025
6 changes: 5 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,9 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
"ignore": [],
"snapshot": {
"useCalculatedVersion": true,
"prereleaseTemplate": "{tag}.{datetime}"
}
}
2 changes: 1 addition & 1 deletion .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Code coverage
name: Coveralls Code Coverage

on:
push:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Beta Release
name: Preview Release

on:
push:
Expand All @@ -21,13 +21,11 @@ jobs:
git config --global user.email "[email protected]"
git config --global user.name "github-actions-bot"

- name: Update package versions for beta release
- name: Update package versions for preview snapshot release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
yarn changeset pre enter beta
# Apply the changeset with specific beta tag
yarn changeset version
yarn changeset version --snapshot preview-${GITHUB_SHA::8}
yarn lint:versions --fix
yarn update-version

Expand All @@ -37,12 +35,12 @@ jobs:
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Publish beta release
- name: Publish preview snapshot release
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
git add .
git commit -am "chore: publish beta version"
git commit -am "chore: publish preview snapshot version"
yarn prepublishOnly
yarn changeset publish --no-git-tag
yarn changeset publish --no-git-tag --tag preview
git reset --hard HEAD^
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Site publish
name: Publish Documentation Site

on:
workflow_dispatch:
Expand All @@ -11,7 +11,7 @@ jobs:
name: Build & publish site
runs-on: ubuntu-latest
# Run the job if manually triggered or if the commit message includes '#publish' & the check suite has passed or if the commit message includes 'docs' and the check suite has passed
if: github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '#publish') || contains(github.event.head_commit.message, 'docs')
if: github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '#publish') || contains(github.event.head_commit.message, 'docs:') || contains(github.event.head_commit.message, 'docs(')
steps:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more explicit to avoid a commit message that has the word docs in the message. this ensures it is of the commit type docs

- name: Checkout PR branch
uses: actions/checkout@v4
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Links, and Smoke Tests
name: Review URLs and Smoke Tests

on:
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"build:ts:watch": "wireit",
"build:types": "wireit",
"build:watch": "wireit",
"changeset-snapshot-publish": "yarn prepublishOnly && yarn changeset version --snapshot && yarn lint:versions --fix && yarn update-version && yarn changeset publish --no-git-tag --tag snapshot",
"changeset-snapshot-publish": "yarn prepublishOnly && yarn changeset version --snapshot snapshot && yarn lint:versions --fix && yarn update-version && yarn changeset publish --no-git-tag --tag snapshot",
"changeset-publish": "yarn prepublishOnly && yarn changeset version && yarn install && yarn lint:versions --fix && yarn update-version && yarn changeset publish --no-git-tag && yarn push-to-remote && yarn create-git-tag && yarn postpublish",
"update-version": "node ./tasks/update-version.js",
"chromatic": "chromatic --build-script-name storybook:build # note that --project-token must be set in your env variables",
Expand Down
Loading