diff --git a/.github/workflows/test-and-release.yml b/.github/workflows/test-and-release.yml index 23252c6..ec419a5 100644 --- a/.github/workflows/test-and-release.yml +++ b/.github/workflows/test-and-release.yml @@ -162,7 +162,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} auto-release: - name: Auto-Create Release Tag + name: Auto-Create Release Tag and Trigger Build runs-on: ubuntu-latest needs: test if: github.event_name == 'push' && github.ref == 'refs/heads/main' @@ -199,3 +199,15 @@ jobs: git tag -a "${{ steps.version.outputs.tag }}" -m "Release ${{ steps.version.outputs.tag }}" git push origin "${{ steps.version.outputs.tag }}" echo "Created and pushed tag: ${{ steps.version.outputs.tag }}" + + - name: Trigger release workflow on tag + if: steps.check_tag.outputs.exists == 'false' + uses: actions/github-script@v7 + with: + script: | + github.rest.actions.createWorkflowDispatch({ + owner: context.repo.owner, + repo: context.repo.repo, + workflow_id: 'test-and-release.yml', + ref: '${{ steps.version.outputs.tag }}' + })