From 640749fa35235842f34b5aa9c5cf2af11a944290 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:32:26 -0600 Subject: [PATCH 1/4] feat: automated releasing via GitHub Actions --- .github/workflows/ci.yml | 16 ++++++---------- .github/workflows/release.yml | 21 +++++++++++++++++++++ 2 files changed, 27 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d80cb5..22644c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,9 +10,8 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: set up python - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: '3.12' - name: Install Dependencies @@ -25,9 +24,8 @@ jobs: matrix: pythonversion: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] steps: - - uses: actions/checkout@v3 - - name: set up python - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.pythonversion }} - name: Install Dependencies @@ -46,10 +44,8 @@ jobs: if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: - - name: Checkout Repository - uses: actions/checkout@v3 - - name: set up Python - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 with: python-version: '3.12' - name: Install Dependencies diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..23e19c4 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,21 @@ +name: release + +on: + push: + tags: + - '*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Build package + run: make install build + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_KEY }} From fbb0e61b6b5771cab43659571afa7dda335c0b0d Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:48:00 -0600 Subject: [PATCH 2/4] fix: swap tags for releases as criteria --- .github/workflows/release.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23e19c4..24b1a87 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,8 @@ name: release on: - push: - tags: - - '*' + release: + types: [published] jobs: release: From 1dafbc38d01e6b2dbd76b7827c67322e26fe0ca7 Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Mon, 29 Jul 2024 15:49:47 -0600 Subject: [PATCH 3/4] feat: enable workflow_dispatch --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 24b1a87..ade47ae 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,6 +3,7 @@ name: release on: release: types: [published] + workflow_dispatch: jobs: release: From 8510a44c12cf738e6e0120cc5411d3f7a925647f Mon Sep 17 00:00:00 2001 From: Justintime50 <39606064+Justintime50@users.noreply.github.com> Date: Mon, 29 Jul 2024 16:01:48 -0600 Subject: [PATCH 4/4] feat: upload built assets to release --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ade47ae..2594c32 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,3 +19,8 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: password: ${{ secrets.PYPI_API_KEY }} + - name: Upload assets to release + uses: AButler/upload-release-assets@v3.0 + with: + files: 'dist/*' + repo-token: ${{ secrets.GITHUB_TOKEN }}