From cf507005e66646198003389ab4b93cd148beae48 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Sun, 25 Apr 2021 13:25:43 +0200 Subject: [PATCH 1/2] Prep for Release Helper Usage --- .github/workflows/check-release.yml | 50 +++++++++++++++++++++++++++++ .github/workflows/python-linux.yml | 10 ------ CHANGELOG.md | 4 +++ MANIFEST.in | 9 +++--- RELEASE.md | 34 +++++++++++++------- 5 files changed, 82 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/check-release.yml diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml new file mode 100644 index 0000000000..2ab93123de --- /dev/null +++ b/.github/workflows/check-release.yml @@ -0,0 +1,50 @@ +name: Check Release +on: + push: + branches: ["master"] + pull_request: + branches: ["*"] + +jobs: + check_release: + runs-on: ubuntu-latest + permissions: + contents: + write + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install Python + uses: actions/setup-python@v2 + with: + python-version: 3.9 + architecture: "x64" + - name: Get pip cache dir + id: pip-cache + run: | + echo "::set-output name=dir::$(pip cache dir)" + - name: Cache pip + uses: actions/cache@v2 + with: + path: ${{ steps.pip-cache.outputs.dir }} + key: ${{ runner.os }}-pip-${{ hashFiles('setup.cfg') }} + restore-keys: | + ${{ runner.os }}-pip- + ${{ runner.os }}-pip- + - name: Cache checked links + uses: actions/cache@v2 + with: + path: ~/.cache/pytest-link-check + key: ${{ runner.os }}-linkcheck-${{ hashFiles('**/.md') }}-md-links + restore-keys: | + ${{ runner.os }}-linkcheck- + - name: Upgrade packaging dependencies + run: | + pip install --upgrade pip setuptools wheel --user + - name: Install Dependencies + run: | + pip install -e . + - name: Check Release + uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/python-linux.yml b/.github/workflows/python-linux.yml index 8fedfc3ecc..eed4081e39 100644 --- a/.github/workflows/python-linux.yml +++ b/.github/workflows/python-linux.yml @@ -68,13 +68,3 @@ jobs: pushd test_install ./bin/pytest --pyargs jupyter_server popd - - name: Check the Manifest - run: | - pip install check-manifest - git clean -dfx - check-manifest -v - - name: Check Version Bump - run: | - pip install tbump - tbump --non-interactive --only-patch 100.1.1 - git checkout . diff --git a/CHANGELOG.md b/CHANGELOG.md index 4295da3404..8771c93299 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ All notable changes to this project will be documented in this file. + + ## 1.6.4 ([Full Changelog](https://github.com/jupyter-server/jupyter_server/compare/v1.6.3...68a64ea13be5d0d86460f04e0c47eb0b6662a0af)) @@ -16,6 +18,8 @@ All notable changes to this project will be documented in this file. [@afshin](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_server+involves%3Aafshin+updated%3A2021-04-21..2021-04-21&type=Issues) + + ## 1.6.3 ([Full Changelog](https://github.com/jupyter-server/jupyter_server/compare/v1.6.2...aa2636795ae1d87e3055febb3931f891dd6b4451)) diff --git a/MANIFEST.in b/MANIFEST.in index 84c24303cc..70ccbaaa91 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -25,7 +25,8 @@ prune docs/dist global-exclude *~ global-exclude *.pyc global-exclude *.pyo -global-exclude .git -global-exclude .ipynb_checkpoints -global-exclude .pytest_cache -global-exclude .coverage +prune .git +prune **/.ipynb_checkpoints +prune **/.pytest_cache +prune **/.coverage +prune **/.pytest_cache diff --git a/RELEASE.md b/RELEASE.md index b492af54d0..a785a28701 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,36 +1,48 @@ # Making a Jupyter Server Release -To create a release, perform the following steps... -## Set up -``` +## Using `jupyter_releaser` + +The recommended way to make a release is to use [`jupyter_releaser`](https://github.com/jupyter-server/jupyter_releaser#checklist-for-adoption). + +## Manual Release + +To create a manual release, perform the following steps: + +### Set up + +```bash pip install tbump twine build git pull origin $(git branch --show-current) git clean -dffx ``` -## Update the version and apply the tag -``` +### Update the version and apply the tag + +```bash echo "Enter new version" read script_version tbump ${script_version} ``` -## Build the artifacts -``` +### Build the artifacts + +```bash rm -rf dist python -m build . ``` -## Update the version back to dev -``` +### Update the version back to dev + +```bash echo "Enter dev version" read dev_version tbump ${dev_version} --no-tag git push origin $(git branch --show-current) ``` -## Publish the artifacts to pypi -``` +### Publish the artifacts to pypi + +```bash twine check dist/* twine upload dist/* ``` From 6f4c0b85ab5c6b7c8ceae8388857ba56e81c7f60 Mon Sep 17 00:00:00 2001 From: Jeremy Tuloup Date: Fri, 30 Apr 2021 12:47:44 +0200 Subject: [PATCH 2/2] Remove permissions from CI workflow --- .github/workflows/check-release.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/check-release.yml b/.github/workflows/check-release.yml index 2ab93123de..335ab9d037 100644 --- a/.github/workflows/check-release.yml +++ b/.github/workflows/check-release.yml @@ -8,9 +8,6 @@ on: jobs: check_release: runs-on: ubuntu-latest - permissions: - contents: - write steps: - name: Checkout uses: actions/checkout@v2