diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..bd0d977 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,37 @@ +name: Build and publish + +on: + push: + +jobs: + build: + name: Build wheel and sdist + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: hynek/build-and-inspect-python-package@14c7e53f5d033cfa99f7af916fa59a6f7f356394 # v2.11.0 + + publish: + name: Publish to PyPI + if: startsWith(github.ref, 'refs/tags/') + runs-on: ubuntu-24.04 + needs: build + environment: + name: pypi + url: https://pypi.org/p/tap-pomelo + permissions: + contents: write + id-token: write + + steps: + - uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 + with: + name: Packages + path: dist + - uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # 2.9.0 + with: + file: dist/*.whl + tag: ${{ github.ref }} + overwrite: true + file_glob: true + - uses: pypa/gh-action-pypi-publish@67339c736fd9354cd4f8cb0b744f2b82a74b5c70 # v1.12.3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ec10963..8419e18 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,8 +45,8 @@ jobs: - "3.13" steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 with: python-version: ${{ matrix.python-version }} allow-prereleases: true diff --git a/pyproject.toml b/pyproject.toml index 9dd22e7..44d64c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [build-system] build-backend = "poetry.core.masonry.api" requires = [ - "poetry-core>=1,<2", + "poetry-core==2.0.1", ] [tool.poetry]