From 0d32a83e6683bbc2d844a9c0b7c034a4814694a2 Mon Sep 17 00:00:00 2001 From: Mike Kinney Date: Sun, 23 Jan 2022 11:41:49 -0800 Subject: [PATCH] improve the release process --- .github/workflows/publish_to_pypi.yml | 35 ----------- .../{build_executables.yml => release.yml} | 60 ++++++++++++++++++- 2 files changed, 59 insertions(+), 36 deletions(-) delete mode 100644 .github/workflows/publish_to_pypi.yml rename .github/workflows/{build_executables.yml => release.yml} (65%) diff --git a/.github/workflows/publish_to_pypi.yml b/.github/workflows/publish_to_pypi.yml deleted file mode 100644 index 3cc2f697..00000000 --- a/.github/workflows/publish_to_pypi.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Publish PyPI - -on: workflow_dispatch - -jobs: - build-and-publish: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Set up Python 3.9 - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - name: Install pypa/build - run: >- - python -m - pip install - build - --user - - name: Build a binary wheel and a source tarball - run: >- - python -m - build - --sdist - --wheel - --outdir dist/ - . - - name: Publish to PyPI - uses: pypa/gh-action-pypi-publish@master - with: - username: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/build_executables.yml b/.github/workflows/release.yml similarity index 65% rename from .github/workflows/build_executables.yml rename to .github/workflows/release.yml index a007879f..41142204 100644 --- a/.github/workflows/build_executables.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,67 @@ -name: Build and publish standalone executables +name: Make Release +on: + workflow_dispatch: + inputs: + version: + description: "Release version (Example: 1.0.0, must match 'version' in setup.py)" + required: true + default: '1.0.0' + on: workflow_dispatch jobs: + Create_Release: + + - name: Create GitHub release + uses: actions/create-release@v1 + id: create_release + with: + draft: true + prerelease: true + release_name: ${{ github.event.inputs.version}} alpha + tag_name: ${{ github.event.inputs.version}} + body: | + Autogenerated by github action, developer should edit as required before publishing... + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + Publish_to_PyPI: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + + - name: Install pypa/build + run: >- + python -m + pip install + build + --user + + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + . + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@master + with: + username: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + + build-and-publish-mac: runs-on: macos-latest