mirror of
https://github.com/jupyter/notebook.git
synced 2025-03-01 12:56:54 +08:00
84 lines
2.3 KiB
YAML
84 lines
2.3 KiB
YAML
name: Build Utilities
|
|
|
|
on:
|
|
push:
|
|
branches: '*'
|
|
pull_request:
|
|
branches: '*'
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash -l {0}
|
|
|
|
jobs:
|
|
versioning:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Install node
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '14.x'
|
|
- name: Install Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.9'
|
|
architecture: 'x64'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install -U jupyterlab~=3.0 jupyter_packaging~=0.7.9 pip
|
|
jlpm
|
|
jlpm run build
|
|
- name: Configure git identity to commit
|
|
run: |
|
|
git config --global user.email "you@example.com"
|
|
git config --global user.name "Your Name"
|
|
- name: Reset version
|
|
run: |
|
|
# TODO: improve this with a mock package?
|
|
# This step is to ensure the workflow always starts with a final version
|
|
sed -i -E "s/VersionInfo\(.*\)/VersionInfo\(9, 8, 7, 'final', 0\)/" retrolab/_version.py
|
|
sed -i -E "s/current_version = .*/current_version = 9, 8, 7, 'final', 0/" .bumpversion.cfg
|
|
jlpm run lerna version 9.8.7 --no-push --force-publish --no-git-tag-version --yes
|
|
git commit -am "Release 9.8.7"
|
|
- name: Patch Release
|
|
run: |
|
|
jlpm release:patch --force
|
|
- name: Minor Release
|
|
run: |
|
|
jlpm release:bump minor --force
|
|
- name: Release Cycle
|
|
run: |
|
|
# beta
|
|
jlpm release:bump release --force
|
|
# rc
|
|
jlpm release:bump release --force
|
|
# final
|
|
jlpm release:bump release --force
|
|
- name: Major Release
|
|
run: |
|
|
jlpm release:bump major --force
|
|
|
|
npm:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Install Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: '3.9'
|
|
architecture: 'x64'
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install -U jupyterlab~=3.0 jupyter_packaging~=0.7.9 pip
|
|
jlpm
|
|
jlpm run build
|
|
- name: Publish to npm in dry-run mode
|
|
run: |
|
|
mkdir dist
|
|
jlpm lerna exec -- npm pack
|
|
cp packages/*/*.tgz dist
|
|
jlpm release:npm --dist ./dist --dry-run
|