You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
87 lines
2.2 KiB
87 lines
2.2 KiB
name: Build Utilities
|
|
|
|
on:
|
|
push:
|
|
branches: ['main']
|
|
pull_request:
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash -l {0}
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
versioning:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Base Setup
|
|
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install -U "jupyterlab>=4.0.0a25,<5" ypy-websocket==0.2 hatch
|
|
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\)/' notebook/_version.py
|
|
cat notebook/_version.py
|
|
sed -i -E 's/current_version = .*/current_version = 9, 8, 7, "final", 0/' .bumpversion.cfg
|
|
cat .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>=4.0.0a25,<5" ypy-websocket==0.2 pip
|
|
jlpm
|
|
jlpm run build
|