From 3bd1b4d75be16b85bb39e0d4e294f3c36da3c26f Mon Sep 17 00:00:00 2001 From: Dwi Siswanto Date: Fri, 20 Nov 2026 21:31:13 +0700 Subject: [PATCH] ci: release with the reusable auto-release workflow The release workflow did not request contents: write, and this repository's GITHUB_TOKEN defaults to read-only, so creating the tag failed with a 403 every week. Call auto-release from projectdiscovery/workflows instead, from a job that grants contents: write. auto-release also tags and releases only when files outside .github changed since the latest v* tag; none have since v0.0.2, so the next run releases nothing and succeeds. Fixes: #16 Refs: projectdiscovery/workflows#9 Signed-off-by: Dwi Siswanto --- .github/workflows/release-tag.yml | 32 ++++--------------------------- 1 file changed, 4 insertions(+), 28 deletions(-) diff --git a/.github/workflows/release-tag.yml b/.github/workflows/release-tag.yml index de42de7..7f7767d 100644 --- a/.github/workflows/release-tag.yml +++ b/.github/workflows/release-tag.yml @@ -6,31 +6,7 @@ on: - cron: '0 0 * * 0' jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v7 - with: - fetch-depth: 0 - - - name: Get Commit Count - id: get_commit - run: git rev-list `git rev-list --tags --no-walk --max-count=1`..HEAD --count | xargs -I {} echo COMMIT_COUNT={} >> $GITHUB_OUTPUT - - - name: Create release and tag - if: ${{ steps.get_commit.outputs.COMMIT_COUNT > 0 }} - id: tag_version - uses: mathieudutour/github-tag-action@v7 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: Create a GitHub release - if: ${{ steps.get_commit.outputs.COMMIT_COUNT > 0 }} - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: ${{ steps.tag_version.outputs.new_tag }} - release_name: Release ${{ steps.tag_version.outputs.new_tag }} - body: ${{ steps.tag_version.outputs.changelog }} + release: + uses: projectdiscovery/workflows/.github/workflows/auto-release.yaml@v1 + permissions: + contents: write