From c16d45ab5c05bf3fa78a074a93fca0e369242825 Mon Sep 17 00:00:00 2001 From: mcflugen Date: Fri, 12 Apr 2024 10:05:38 -0600 Subject: [PATCH 1/4] add release and prerelease workflows --- .github/workflows/prerelease.yml | 55 +++++++++++++++++++++++++++++++ .github/workflows/release.yml | 56 ++++++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 .github/workflows/prerelease.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml new file mode 100644 index 0000000..4dc5941 --- /dev/null +++ b/.github/workflows/prerelease.yml @@ -0,0 +1,55 @@ +name: TestPyPI + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+[ab][0-9]+' + +jobs: + + build-sdist: + name: Build source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build sdist + run: pipx run build --sdist + + - uses: actions/upload-artifact@v3 + with: + name: pypi-artifacts + path: dist/*.tar.gz + + show-artifacts: + needs: ["build-sdist"] + name: "Show artifacts" + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v3 + with: + name: pypi-artifacts + path: ${{ github.workspace }}/dist + + - shell: bash + run: | + ls -l ${{ github.workspace }}/dist + + publish-to-test-pypi: + needs: ["build-sdist"] + name: "Publish to TestPyPI" + runs-on: ubuntu-latest + permissions: + id-token: write + + steps: + - uses: actions/download-artifact@v3 + with: + name: pypi-artifacts + path: ${{ github.workspace }}/dist + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository_url: 'https://test.pypi.org/legacy/' + skip_existing: true + print_hash: true + verify_metadata: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..de697b0 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,56 @@ +name: PyPI + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + - '!v[0-9]+.[0-9]+.[0-9]+[ab][0-9]+' + + +jobs: + + build-sdist: + name: Build source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build sdist + run: pipx run build --sdist + + - uses: actions/upload-artifact@v3 + with: + name: pypi-artifacts + path: dist/*.tar.gz + + show-artifacts: + needs: ["build-sdist"] + name: "Show artifacts" + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v3 + with: + name: pypi-artifacts + path: ${{ github.workspace }}/dist + + - shell: bash + run: | + ls -l ${{ github.workspace }}/dist + + publish-to-pypi: + needs: ["build-sdist"] + name: "Publish to PyPI" + runs-on: ubuntu-latest + permissions: + id-token: write + + steps: + - uses: actions/download-artifact@v3 + with: + name: pypi-artifacts + path: ${{ github.workspace }}/dist + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + skip_existing: true + print_hash: true + verify_metadata: false From 60a86d846e082752397f7b789cf53c3892e6aa04 Mon Sep 17 00:00:00 2001 From: mcflugen Date: Fri, 12 Apr 2024 10:08:28 -0600 Subject: [PATCH 2/4] remove lint workflow --- .github/workflows/lint.yml | 27 --------------------------- 1 file changed, 27 deletions(-) delete mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 5ac6b4a..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,27 +0,0 @@ -name: Lint - -on: [push, pull_request] - -jobs: - - lint: - name: Check for lint - # We want to run on external PRs, but not on our own internal PRs as they'll be run - # by the push to the branch. Without this if check, checks are duplicated since - # internal PRs match both the push and pull_request events. - if: - github.event_name == 'push' || github.event.pull_request.head.repo.full_name != - github.repository - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.12 - uses: actions/setup-python@v2 - with: - python-version: 3.12 - - - name: Lint - run: | - pip install nox tomli - nox -s lint From 5fd67be5812041c0e895a9e7e11c14fa66677fa1 Mon Sep 17 00:00:00 2001 From: mcflugen Date: Fri, 12 Apr 2024 10:10:27 -0600 Subject: [PATCH 3/4] remove docs workflow --- .github/workflows/docs.yml | 53 -------------------------------------- 1 file changed, 53 deletions(-) delete mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 565b221..0000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,53 +0,0 @@ -name: Documentation - -on: - push: - paths: - - "docs/**" - - "AUTHORS.rst" - - "CHANGES.rst" - - "CONTRIBUTING.rst" - - "LICENSE.rst" - - "README.rst" - pull_request: - paths: - - "docs/**" - - "AUTHORS.rst" - - "CHANGES.rst" - - "CONTRIBUTING.rst" - - "LICENSE.rst" - - "README.rst" - -jobs: - build: - # We want to run on external PRs, but not on our own internal PRs as they'll be run - # by the push to the branch. Without this if check, checks are duplicated since - # internal PRs match both the push and pull_request events. - if: - github.event_name == 'push' || github.event.pull_request.head.repo.full_name != - github.repository - - runs-on: ubuntu-latest - - defaults: - run: - shell: bash -l {0} - - steps: - - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 - with: - auto-update-conda: true - python-version: 3.12 - channels: conda-forge - channel-priority: true - - - name: Show conda installation info - run: conda info - - - name: Install dependencies - run: | - pip install nox - - - name: Build documentation - run: nox -s build-docs From 501d23376a1cdc7aaabc21aef6ab0326d62f3bc1 Mon Sep 17 00:00:00 2001 From: mcflugen Date: Fri, 12 Apr 2024 10:39:17 -0600 Subject: [PATCH 4/4] set version to 0.3.10a0 --- babelizer/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/babelizer/_version.py b/babelizer/_version.py index e810296..c5998a3 100644 --- a/babelizer/_version.py +++ b/babelizer/_version.py @@ -1 +1 @@ -__version__ = "0.3.10.dev0" +__version__ = "0.3.10a0"