Skip to content

Commit

Permalink
fix: bump codesandbox-client and test new publish script (#1056)
Browse files Browse the repository at this point in the history
* fix: bump codesandbox-client and test new publish script

* Update release.yml
  • Loading branch information
danilowoz committed Jan 11, 2024
1 parent b111b74 commit 1736185
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 43 deletions.
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

1 comment on commit 1736185

@vercel
Copy link

@vercel vercel bot commented on 1736185 Jan 11, 2024

Choose a reason for hiding this comment

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

Please sign in to comment.