Skip to content

Commit 2d9fabe

Browse files
chore: update preview release workflow to use snapshots (#5365)
1 parent c674612 commit 2d9fabe

File tree

6 files changed

+16
-14
lines changed

6 files changed

+16
-14
lines changed

.changeset/config.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,9 @@
1212
"access": "public",
1313
"baseBranch": "main",
1414
"updateInternalDependencies": "patch",
15-
"ignore": []
15+
"ignore": [],
16+
"snapshot": {
17+
"useCalculatedVersion": true,
18+
"prereleaseTemplate": "{tag}.{datetime}"
19+
}
1620
}

.github/workflows/coveralls.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Code coverage
1+
name: Coveralls Code Coverage
22

33
on:
44
push:

.github/workflows/beta-release.yml renamed to .github/workflows/preview-release.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Beta Release
1+
name: Preview Release
22

33
on:
44
push:
@@ -21,13 +21,11 @@ jobs:
2121
git config --global user.email "[email protected]"
2222
git config --global user.name "github-actions-bot"
2323
24-
- name: Update package versions for beta release
24+
- name: Update package versions for preview snapshot release
2525
env:
2626
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2727
run: |
28-
yarn changeset pre enter beta
29-
# Apply the changeset with specific beta tag
30-
yarn changeset version
28+
yarn changeset version --snapshot preview-${GITHUB_SHA::8}
3129
yarn lint:versions --fix
3230
yarn update-version
3331
@@ -37,12 +35,12 @@ jobs:
3735
run: |
3836
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
3937
40-
- name: Publish beta release
38+
- name: Publish preview snapshot release
4139
env:
4240
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4341
run: |
4442
git add .
45-
git commit -am "chore: publish beta version"
43+
git commit -am "chore: publish preview snapshot version"
4644
yarn prepublishOnly
47-
yarn changeset publish --no-git-tag
45+
yarn changeset publish --no-git-tag --tag preview
4846
git reset --hard HEAD^

.github/workflows/publish.yml renamed to .github/workflows/publish-docs-site.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Site publish
1+
name: Publish Documentation Site
22

33
on:
44
workflow_dispatch:
@@ -11,7 +11,7 @@ jobs:
1111
name: Build & publish site
1212
runs-on: ubuntu-latest
1313
# 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
14-
if: github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '#publish') || contains(github.event.head_commit.message, 'docs')
14+
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(')
1515
steps:
1616
- name: Checkout PR branch
1717
uses: actions/checkout@v4

.github/workflows/test.yml renamed to .github/workflows/urls-smoke-test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Links, and Smoke Tests
1+
name: Review URLs and Smoke Tests
22

33
on:
44
pull_request:

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"build:ts:watch": "wireit",
2323
"build:types": "wireit",
2424
"build:watch": "wireit",
25-
"changeset-snapshot-publish": "yarn prepublishOnly && yarn changeset version --snapshot && yarn lint:versions --fix && yarn update-version && yarn changeset publish --no-git-tag --tag snapshot",
25+
"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",
2626
"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",
2727
"update-version": "node ./tasks/update-version.js",
2828
"chromatic": "chromatic --build-script-name storybook:build # note that --project-token must be set in your env variables",

0 commit comments

Comments
 (0)