From 6d57092a43c9da91d1570c796d612fa8c22635eb Mon Sep 17 00:00:00 2001 From: gunthergl_r2 Date: Tue, 16 Jan 2024 10:17:20 +0100 Subject: [PATCH] update CI --- .github/workflows/ci.yml | 44 ++++++++++++++++++++-------------------- README.rst | 14 +++++++++++-- 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0be848a..0fdea1e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -147,25 +147,25 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} parallel-finished: true - # publish: - # needs: finalize - # if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }} - # runs-on: ubuntu-latest - # permissions: - # contents: write - # steps: - # - uses: actions/checkout@v3 - # - uses: actions/setup-python@v4 - # with: {python-version: "3.11"} - # - name: Retrieve pre-built distribution files - # uses: actions/download-artifact@v3 - # with: {name: python-distribution-files, path: dist/} - # - name: Publish Package - # env: - # # TODO: Set your PYPI_TOKEN as a secret using GitHub UI - # # - https://pypi.org/help/#apitoken - # # - https://docs.github.com/en/actions/security-guides/encrypted-secrets - # TWINE_REPOSITORY: pypi - # TWINE_USERNAME: __token__ - # TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} - # run: pipx run tox -e publish + publish: + needs: finalize + if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }} + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: {python-version: "3.11"} + - name: Retrieve pre-built distribution files + uses: actions/download-artifact@v3 + with: {name: python-distribution-files, path: dist/} + - name: Publish Package + env: + # TODO: Set your PYPI_TOKEN as a secret using GitHub UI + # - https://pypi.org/help/#apitoken + # - https://docs.github.com/en/actions/security-guides/encrypted-secrets + TWINE_REPOSITORY: pypi + TWINE_USERNAME: __token__ + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: pipx run tox -e publish diff --git a/README.rst b/README.rst index 7f15c83..287e3f0 100644 --- a/README.rst +++ b/README.rst @@ -65,6 +65,9 @@ Package setup This project has been set up using PyScaffold 4.4. For details and usage information on PyScaffold see https://pyscaffold.org/:: + +.. code-block:: bash + pip install pyscaffold putup nbnode cd nbnode @@ -88,9 +91,16 @@ information on PyScaffold see https://pyscaffold.org/:: pip install pre-commit pre-commit autoupdate -Migration to github: + # Migration to github: + + putup --update . --github + + # pypi: + # login, then create a new token https://pypi.org/manage/account/token/ + # re-comment (after I commented them out) + # .github/workflows/ci.yml: + # publish: [...] - putup --update . --github