diff --git a/.github/workflows/auto_approve.yml b/.github/workflows/auto_approve.yml index 5fbbef7..a43c12b 100644 --- a/.github/workflows/auto_approve.yml +++ b/.github/workflows/auto_approve.yml @@ -13,9 +13,16 @@ jobs: id: metadata uses: dependabot/fetch-metadata@v1 with: - github-token: "${{ secrets.GITHUB_TOKEN }}" - - name: Approve a PR + github-token: ${{ secrets.GITHUB_TOKEN }} + - name: approve and enable auto-merge + run: | + gh pr review --approve "$PR_URL" + gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: second approval run: gh pr review --approve "$PR_URL" env: PR_URL: ${{ github.event.pull_request.html_url }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.APPROVAL_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/release_bump.yml b/.github/workflows/release_bump.yml index 9da53d4..6845773 100644 --- a/.github/workflows/release_bump.yml +++ b/.github/workflows/release_bump.yml @@ -63,6 +63,7 @@ jobs: # Run semantic-release to generate new changelog pip install --upgrade hatch hatch env create release + hatch run release:deps NEXT_SEMVER=$(hatch run release:bump $BUMP_ARGS) # Grab the new version's changelog and prepend it to the original changelog contents diff --git a/hatch.toml b/hatch.toml index ba6cff8..189ecd9 100644 --- a/hatch.toml +++ b/hatch.toml @@ -42,10 +42,8 @@ test = "pytest --no-cov {args:test/*/e2e}" [envs.release] detached = true -dependencies = [ - "python-semantic-release == 8.7.*" -] [envs.release.scripts] +deps = "pip install -r requirements-release.txt" bump = "semantic-release -v --strict version --no-push --no-commit --no-tag --skip-build {args}" version = "semantic-release -v --strict version --print {args}" diff --git a/requirements-release.txt b/requirements-release.txt index 2f7766c..1b5560d 100644 --- a/requirements-release.txt +++ b/requirements-release.txt @@ -1,3 +1 @@ -# HACK: This file solely exists for dependabot checks. The actual dependencies are in `hatch.toml` in the `release` environment. -# If dependabot opens a PR that modifies this file, please make sure to update the coresponding dependency in `hatch.toml` as well. python-semantic-release == 8.7.* \ No newline at end of file