Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions .github/workflows/release-ember-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ on:
default: false
type: boolean

concurrency:
group: sdk-release
cancel-in-progress: false

jobs:
release:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -77,6 +81,7 @@ jobs:
echo "tag=ember/v$NEW_VERSION" >> $GITHUB_OUTPUT

- name: Generate changelog
continue-on-error: true
uses: openai/codex-action@a26d2d4d8b78a694338b8e3715c3630254340b2c # v1
with:
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
Expand Down Expand Up @@ -127,6 +132,14 @@ jobs:
working-directory: ./clients/ember
run: pnpm run lint

- name: Verify package version is unpublished
working-directory: ./clients/ember
run: |
if npm view @vizzly-testing/ember@${{ steps.version.outputs.version }} version >/dev/null 2>&1; then
echo "@vizzly-testing/ember@${{ steps.version.outputs.version }} is already published"
exit 1
fi

- name: Update CHANGELOG.md
working-directory: ./clients/ember
run: |
Expand Down Expand Up @@ -157,6 +170,13 @@ jobs:
mv CHANGELOG-NEW.md CHANGELOG.md
rm CHANGELOG-RELEASE.md

- name: Pack package
id: pack
working-directory: ./clients/ember
run: |
PACK_FILE=$(npm pack --ignore-scripts)
echo "file=$PACK_FILE" >> $GITHUB_OUTPUT

- name: Reconfigure git auth
run: |
git config --local user.email "${{ secrets.GIT_USER_EMAIL }}"
Expand All @@ -175,9 +195,9 @@ jobs:
working-directory: ./clients/ember
run: |
if [ "${{ github.event.inputs.prerelease }}" == "true" ]; then
npm publish --provenance --access public --tag beta
npm publish "${{ steps.pack.outputs.file }}" --provenance --access public --tag beta
else
npm publish --provenance --access public
npm publish "${{ steps.pack.outputs.file }}" --provenance --access public
fi

- name: Read changelog for release
Expand All @@ -198,7 +218,7 @@ jobs:
tag_name: ${{ steps.version.outputs.tag }}
name: 🐹 Ember SDK v${{ steps.version.outputs.version }}
body: ${{ steps.release_notes.outputs.notes }}
files: ./clients/ember/*.tgz
files: ./clients/ember/${{ steps.pack.outputs.file }}
draft: false
prerelease: ${{ github.event.inputs.prerelease }}
env:
Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/release-ruby-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- minor
- major

concurrency:
group: sdk-release
cancel-in-progress: false

jobs:
release:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -42,6 +46,11 @@ jobs:
git config --local user.email "${{ secrets.GIT_USER_EMAIL }}"
git config --local user.name "${{ secrets.GIT_USER_NAME }}"

- name: Ensure we have latest main
run: |
git fetch origin main
git reset --hard origin/main

- name: Get current version
id: current_version
working-directory: ./clients/ruby
Expand Down Expand Up @@ -78,6 +87,7 @@ jobs:
echo "tag=ruby/v$NEW_VERSION" >> $GITHUB_OUTPUT

- name: Generate changelog
continue-on-error: true
uses: openai/codex-action@a26d2d4d8b78a694338b8e3715c3630254340b2c # v1
with:
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
Expand Down Expand Up @@ -114,7 +124,11 @@ jobs:
### Fixed
- Bug fixes

**Full Changelog**: https://github.com/vizzly-testing/vizzly-cli/compare/ruby/v${{ steps.current_version.outputs.version }}...ruby/v${{ steps.new_version.outputs.version }}
**Full Changelog**: https://github.com/vizzly-testing/cli/compare/ruby/v${{ steps.current_version.outputs.version }}...ruby/v${{ steps.new_version.outputs.version }}

- name: Install dependencies
working-directory: ./clients/ruby
run: bundle install

- name: Update version in gemspec
working-directory: ./clients/ruby
Expand Down Expand Up @@ -147,6 +161,18 @@ jobs:
mv CHANGELOG-NEW.md CHANGELOG.md
rm CHANGELOG-RELEASE.md

- name: Run tests
working-directory: ./clients/ruby
run: bundle exec rake

- name: Verify gem version is unpublished
working-directory: ./clients/ruby
run: |
if gem list --remote --exact vizzly --version "${{ steps.new_version.outputs.version }}" | grep -q '^vizzly '; then
echo "vizzly ${{ steps.new_version.outputs.version }} is already published"
exit 1
fi

- name: Reconfigure git auth
run: |
git config --local user.email "${{ secrets.GIT_USER_EMAIL }}"
Expand Down
24 changes: 22 additions & 2 deletions .github/workflows/release-static-site-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- minor
- major

concurrency:
group: sdk-release
cancel-in-progress: false

jobs:
release:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -68,6 +72,7 @@ jobs:
echo "tag=static-site/v$NEW_VERSION" >> $GITHUB_OUTPUT

- name: Generate changelog
continue-on-error: true
uses: openai/codex-action@a26d2d4d8b78a694338b8e3715c3630254340b2c # v1
with:
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
Expand Down Expand Up @@ -118,6 +123,14 @@ jobs:
working-directory: ./clients/static-site
run: pnpm run lint

- name: Verify package version is unpublished
working-directory: ./clients/static-site
run: |
if npm view @vizzly-testing/static-site@${{ steps.version.outputs.version }} version >/dev/null 2>&1; then
echo "@vizzly-testing/static-site@${{ steps.version.outputs.version }} is already published"
exit 1
fi

- name: Update CHANGELOG.md
working-directory: ./clients/static-site
run: |
Expand Down Expand Up @@ -168,6 +181,13 @@ jobs:
working-directory: ./clients/static-site
run: pnpm run build

- name: Pack package
id: pack
working-directory: ./clients/static-site
run: |
PACK_FILE=$(npm pack --ignore-scripts)
echo "file=$PACK_FILE" >> $GITHUB_OUTPUT

- name: Reconfigure git auth
run: |
git config --local user.email "${{ secrets.GIT_USER_EMAIL }}"
Expand All @@ -184,7 +204,7 @@ jobs:

- name: Publish to npm
working-directory: ./clients/static-site
run: npm publish --provenance --access public
run: npm publish "${{ steps.pack.outputs.file }}" --provenance --access public

- name: Read changelog for release
id: release_notes
Expand All @@ -204,7 +224,7 @@ jobs:
tag_name: ${{ steps.version.outputs.tag }}
name: 🏗️ Static Site Plugin v${{ steps.version.outputs.version }}
body: ${{ steps.release_notes.outputs.notes }}
files: ./clients/static-site/*.tgz
files: ./clients/static-site/${{ steps.pack.outputs.file }}
draft: false
prerelease: false
env:
Expand Down
24 changes: 22 additions & 2 deletions .github/workflows/release-storybook-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- minor
- major

concurrency:
group: sdk-release
cancel-in-progress: false

jobs:
release:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -68,6 +72,7 @@ jobs:
echo "tag=storybook/v$NEW_VERSION" >> $GITHUB_OUTPUT

- name: Generate changelog
continue-on-error: true
uses: openai/codex-action@a26d2d4d8b78a694338b8e3715c3630254340b2c # v1
with:
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
Expand Down Expand Up @@ -118,6 +123,14 @@ jobs:
working-directory: ./clients/storybook
run: pnpm run lint

- name: Verify package version is unpublished
working-directory: ./clients/storybook
run: |
if npm view @vizzly-testing/storybook@${{ steps.version.outputs.version }} version >/dev/null 2>&1; then
echo "@vizzly-testing/storybook@${{ steps.version.outputs.version }} is already published"
exit 1
fi

- name: Update CHANGELOG.md
working-directory: ./clients/storybook
run: |
Expand Down Expand Up @@ -152,6 +165,13 @@ jobs:
working-directory: ./clients/storybook
run: pnpm run build

- name: Pack package
id: pack
working-directory: ./clients/storybook
run: |
PACK_FILE=$(npm pack --ignore-scripts)
echo "file=$PACK_FILE" >> $GITHUB_OUTPUT

- name: Reconfigure git auth
run: |
git config --local user.email "${{ secrets.GIT_USER_EMAIL }}"
Expand All @@ -174,7 +194,7 @@ jobs:
rm -f ~/.npmrc 2>/dev/null || true
npm config set registry https://registry.npmjs.org/
echo "npm version: $(npm --version)"
npm publish --provenance --access public
npm publish "${{ steps.pack.outputs.file }}" --provenance --access public

- name: Read changelog for release
id: release_notes
Expand All @@ -194,7 +214,7 @@ jobs:
tag_name: ${{ steps.version.outputs.tag }}
name: 📚 Storybook Plugin v${{ steps.version.outputs.version }}
body: ${{ steps.release_notes.outputs.notes }}
files: ./clients/storybook/*.tgz
files: ./clients/storybook/${{ steps.pack.outputs.file }}
draft: false
prerelease: false
env:
Expand Down
33 changes: 27 additions & 6 deletions .github/workflows/release-swift-client.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- minor
- major

concurrency:
group: sdk-release
cancel-in-progress: false

jobs:
release:
runs-on: macos-latest
Expand Down Expand Up @@ -40,17 +44,31 @@ jobs:
git config --local user.email "${{ secrets.GIT_USER_EMAIL }}"
git config --local user.name "${{ secrets.GIT_USER_NAME }}"

- name: Ensure we have latest main
run: |
git fetch origin main
git reset --hard origin/main

- name: Get current version
id: current_version
working-directory: ./clients/swift
run: |
# Extract version from CHANGELOG.md
CURRENT_VERSION=$(grep -m 1 "## \[" CHANGELOG.md | sed 's/## \[\(.*\)\].*/\1/')
# Extract the latest released semver entry. Ignore [Unreleased].
CURRENT_VERSION=$(grep -m 1 -E '^## \[[0-9]+\.[0-9]+\.[0-9]+\]' CHANGELOG.md | sed 's/## \[\(.*\)\].*/\1/' || true)
if [ -z "$CURRENT_VERSION" ]; then
CURRENT_VERSION="0.1.0"
CURRENT_VERSION="0.0.0"
fi
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT

- name: Get previous release tag
id: previous_tag
run: |
PREV_TAG=""
if git rev-parse "swift/v${{ steps.current_version.outputs.version }}" >/dev/null 2>&1; then
PREV_TAG="swift/v${{ steps.current_version.outputs.version }}"
fi
echo "tag=$PREV_TAG" >> $GITHUB_OUTPUT

- name: Calculate new version
id: new_version
run: |
Expand Down Expand Up @@ -80,6 +98,7 @@ jobs:
echo "tag=swift/v$NEW_VERSION" >> $GITHUB_OUTPUT

- name: Generate changelog
continue-on-error: true
uses: openai/codex-action@a26d2d4d8b78a694338b8e3715c3630254340b2c # v1
with:
openai-api-key: ${{ secrets.OPENAI_API_KEY }}
Expand All @@ -90,12 +109,14 @@ jobs:

Context:
- Client location: `clients/swift/`
- Previous tag: `swift/v${{ steps.current_version.outputs.version }}`
- Previous tag: `${{ steps.previous_tag.outputs.tag }}`
- New version: `${{ steps.new_version.outputs.version }}`
- This is a monorepo with multiple clients and a CLI.
- Compare URL when a previous tag exists: `https://github.com/vizzly-testing/cli/compare/${{ steps.previous_tag.outputs.tag }}...swift/v${{ steps.new_version.outputs.version }}`
- Release URL when this is the first Swift tag: `https://github.com/vizzly-testing/cli/releases/tag/swift/v${{ steps.new_version.outputs.version }}`

Instructions:
1. Use git commands to inspect commits and changed files since the previous Swift tag.
1. Use git commands to inspect commits and changed files since the previous Swift tag. If no previous tag is listed, inspect the Swift client history and current files.
2. Analyze which changes are relevant to `clients/swift/`.
3. Read relevant code changes when commit messages are not enough.
4. Generate user-friendly release notes with categories: Added, Changed, Fixed.
Expand All @@ -116,7 +137,7 @@ jobs:
### Fixed
- Bug fixes

**Full Changelog**: https://github.com/vizzly-testing/cli/compare/swift/v${{ steps.current_version.outputs.version }}...swift/v${{ steps.new_version.outputs.version }}
**Full Changelog**: <use the compare URL when a previous tag exists, otherwise use the release URL>

- name: Update CHANGELOG.md
working-directory: ./clients/swift
Expand Down
Loading