diff --git a/.github/workflows/auto-merge-deps.yml b/.github/workflows/auto-merge-deps.yml new file mode 100644 index 0000000..53658e9 --- /dev/null +++ b/.github/workflows/auto-merge-deps.yml @@ -0,0 +1,14 @@ +name: auto-merge + +on: + pull_request: + +jobs: + auto-merge: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ahmadnassri/action-dependabot-auto-merge@v2 + with: + target: minor + github-token: ${{ secrets.AUTO_MERGE }} diff --git a/.github/workflows/check-build.yml b/.github/workflows/check-build.yml new file mode 100644 index 0000000..ecb68f1 --- /dev/null +++ b/.github/workflows/check-build.yml @@ -0,0 +1,27 @@ +name: Check Distribution Build + +on: push + +jobs: + check-build: + name: Twine Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + with: + fetch-depth: 0 + + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Install Build Tools + run: pip install build twine + + - name: Build a binary wheel + run: | + python -m build . + + - name: Check Distribution + run: | + twine check dist/* diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 252a467..fb229be 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -1,9 +1,8 @@ name: Publish Python distributions to PyPI on: - push: - tags: - - '*' + release: + types: [published] jobs: build-n-publish: @@ -11,7 +10,9 @@ jobs: runs-on: ubuntu-latest env: ENV_NAME: publish - PYTHON: 3.8 + PYTHON: "3.10" + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing steps: - uses: actions/checkout@main with: @@ -30,8 +31,4 @@ jobs: python -m build - name: Publish to PyPI - if: startsWith(github.event.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@master - with: - user: __token__ - password: ${{ secrets.pypi_password }} + uses: pypa/gh-action-pypi-publish@v1.8.11 diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml new file mode 100644 index 0000000..e69de29 diff --git a/.github/workflows/release-draft.yml b/.github/workflows/release-draft.yml new file mode 100644 index 0000000..0bf31f0 --- /dev/null +++ b/.github/workflows/release-draft.yml @@ -0,0 +1,23 @@ +name: Update Draft Release + +on: + push: + branches: main + +jobs: + draft-release: + name: Update Draft Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + with: + fetch-depth: 0 + + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + + - name: Publish the release notes + uses: release-drafter/release-drafter@v5.25.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}