diff --git a/.github/workflows/dependabot.yaml b/.github/workflows/dependabot.yaml new file mode 100644 index 0000000..b6f776d --- /dev/null +++ b/.github/workflows/dependabot.yaml @@ -0,0 +1,30 @@ + +name: Merge dependabot PRs + +on: pull_request_target + +permissions: + pull-requests: write + contents: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Dependabot metadata + id: dependabot-metadata + uses: dependabot/fetch-metadata@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: Approve a PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Enable auto-merge for Dependabot PRs + if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }} + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..270ee33 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,24 @@ +name: release +on: + push: + tags: + - '*' +jobs: + build: + name: snapshot + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v4 + with: + python-version: 3.9 + - name: checkout + run: git fetch --prune --unshallow + - name: pipenv + run: pip install pipenv && pipenv sync -d + - name: distribute application + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{secrets.twine_password }} + packages_dir: dist/