Skip to content

Commit

Permalink
chore: add frontend dev release (#939)
Browse files Browse the repository at this point in the history
  • Loading branch information
mscolnick committed Mar 12, 2024
1 parent 914760c commit 4272535
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/dev-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches:
- main
jobs:
upload_dev_wheel:
publish_dev_release:
name: 📤 Publish dev release
runs-on: ubuntu-latest
defaults:
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
cache: "pip"

# patch __init__.py version to be of the form
# X.Y.<Z+1>.dev{n-commits-since-last-tag}
# X.Y.<Z+1>-dev{n-commits-since-last-tag}
- name: 🔨 Patch version number
run: |
# Get the version number and increment patch
Expand All @@ -57,7 +57,7 @@ jobs:
n_commits=`git rev-list $(git describe --tags --abbrev=0)..HEAD --count`
# Form the new version, which is one patch ahead of the last version
# so installing from Test PyPI does the right thing
NEW_VERSION="${incremented_version}.dev${n_commits}"
NEW_VERSION="${incremented_version}-dev${n_commits}"
sed -i "s/__version__ = \".*\"/__version__ = \"$NEW_VERSION\"/" marimo/__init__.py
- name: 📦 Build marimo
Expand All @@ -72,3 +72,16 @@ jobs:
TWINE_USERNAME: ${{ secrets.TEST_PYPI_USER }}
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
run: twine upload --repository testpypi --skip-existing dist/*

- name: 📦 Update package.json version from CLI
working-directory: frontend
run: |
echo "Updating package.json version to $(marimo --version)"
npm version $(marimo --version) --no-git-tag-version
- name: 📤 Upload to npm
working-directory: frontend
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish --access public

0 comments on commit 4272535

Please sign in to comment.