Skip to content
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

fix: bump codesandbox-client and test new publish script #1056

Merged
merged 2 commits into from
Jan 11, 2024
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
46 changes: 4 additions & 42 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,54 +99,16 @@ jobs:
- name: Release | Lerna Publish
run: lerna publish from-package --yes

publish-gh-package:
name: Publish to GitHub Packages
timeout-minutes: 20
runs-on: ubuntu-latest
needs: [bundler]
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

steps:
- name: Setup | Checkout
uses: actions/checkout@v4
with:
# pulls all commits (needed for lerna / semantic release to correctly version)
fetch-depth: "0"
# Publish to GitHub packages too

- name: Setup GitHub npm registry
- name: "GitHub packages: Setup GitHub npm registry"
run: echo -e "@codesandbox:registry=https://npm.pkg.github.com\n//npm.pkg.github.com/:_authToken=${GH_TOKEN}" > .npmrc
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Setup | Node.js
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- name: Install dependencies and cache
uses: bahmutov/npm-install@v1
with:
useLockFile: true

- name: Prepare | Download artifacts
uses: actions/download-artifact@v3
with:
name: bundler
path: bundler

- name: Prepare | Lerna Version
run: yarn lerna version --yes --no-private

- name: Prepare | Build
run: |
yarn workspace @codesandbox/sandpack-client build:publish
yarn workspace @codesandbox/sandpack-react build:publish
yarn workspace @codesandbox/sandpack-themes build:publish

- name: Release | Publish
- name: "GitHub packages: Publish"
run: |
cd sandpack-client && npm publish --registry=https://npm.pkg.github.com &&
cd ../sandpack-react && npm publish --registry=https://npm.pkg.github.com &&
cd ../sandpack-themes && npm publish --registry=https://npm.pkg.github.com
cd ../sandpack-themes && npm publish --registry=https://npm.pkg.github.com
2 changes: 1 addition & 1 deletion sandpack-client/.bundler
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Manually generated file to trigger new releases based on the bundler changes.
// The following value is the commit hash from codesandbox-client
526d99348d096adbfc3824d43f0dbd1fb60780191
526d99348d096adbfc3824d43f0dbd1fb607801911
Loading