mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
chore(release): test new release script
This commit is contained in:
@@ -42,36 +42,49 @@ jobs:
|
||||
echo "::set-output name=is_in_prerelease_mode::false"
|
||||
fi
|
||||
|
||||
- name: Create Release Pull Request or Publish to npm
|
||||
id: changesets
|
||||
uses: ./.github/actions/changesets-action
|
||||
with:
|
||||
publish: pnpm changeset publish --no-git-tag
|
||||
cwd: CopilotKit
|
||||
createGithubReleases: true
|
||||
- name: Get current version
|
||||
id: current-version
|
||||
run: |
|
||||
echo "version=$(node -p "require('./packages/react-core/package.json').version")" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Make prerelease
|
||||
if: ${{ steps.is-in-prerelease-mode.outputs.is_in_prerelease_mode == 'true' }}
|
||||
id: prerelease
|
||||
run: |
|
||||
pnpm changeset version
|
||||
pnpm changeset publish --no-git-tag --tag next
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }}
|
||||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
||||
|
||||
- name: Print outputs
|
||||
- name: Get new version
|
||||
id: new-version
|
||||
run: |
|
||||
echo "published: ${{ steps.changesets.outputs.published }}"
|
||||
echo "publishedPackages: ${{ steps.changesets.outputs.publishedPackages }}"
|
||||
echo "version=$(node -p "require('./packages/react-core/package.json').version")" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Check if published
|
||||
id: check-if-published
|
||||
run: |
|
||||
if [ "${{ steps.new-version.outputs.version }}" != "${{ steps.current-version.outputs.version }}" ]; then
|
||||
echo "::set-output name=published::true"
|
||||
else
|
||||
echo "::set-output name=published::false"
|
||||
fi
|
||||
|
||||
- name: Tag "next" post publish
|
||||
if: ${{ steps.changesets.outputs.published == 'true' }} && ${{ steps.is-in-prerelease-mode.outputs.is_in_prerelease_mode == 'true' }}
|
||||
if: ${{ steps.check-if-published.outputs.published == 'true' }} && ${{ steps.is-in-prerelease-mode.outputs.is_in_prerelease_mode == 'true' }}
|
||||
run: |
|
||||
echo "Will tag next"
|
||||
|
||||
- name: Put `main` back in prerelease mode
|
||||
if: ${{ github.ref == 'refs/heads/main' && steps.changesets.outputs.published }}
|
||||
if: ${{ github.ref == 'refs/heads/main' && steps.check-if-published.outputs.published == 'true' }}
|
||||
run: |
|
||||
if [ ! -f ".changeset/pre.json" ]; then
|
||||
pnpm changeset pre enter next
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git add .
|
||||
if [ ! -f ".changeset/pre.json" ]; then
|
||||
pnpm changeset pre enter next
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git add .
|
||||
git commit -m "chore: entering prerelease mode (next)"
|
||||
git push origin main --force
|
||||
fi
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
---
|
||||
"@copilotkit/react-core": patch
|
||||
"@copilotkit/react-textarea": patch
|
||||
"@copilotkit/react-ui": patch
|
||||
"@copilotkit/runtime": patch
|
||||
"@copilotkit/runtime-client-gql": patch
|
||||
"@copilotkit/sdk-js": patch
|
||||
"@copilotkit/shared": patch
|
||||
---
|
||||
|
||||
test prerelease #4
|
||||
@@ -10,9 +10,9 @@
|
||||
"check-types": "turbo check-types",
|
||||
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
|
||||
"check-prettier": "prettier --check \"**/*.{ts,tsx,md}\"",
|
||||
"publish-packages": "turbo run build lint && changeset version && changeset publish",
|
||||
"freshbuild": "pnpm -w clean && pnpm i && pnpm -w build",
|
||||
"precommit": "pnpm run docs"
|
||||
"precommit": "pnpm run docs",
|
||||
"prepublish": "turbo run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@changesets/cli": "^2.27.10",
|
||||
|
||||
Reference in New Issue
Block a user