mirror of
https://github.com/unpoller/unpoller.git
synced 2026-09-30 03:21:28 +02:00
fix: explicitly dispatch release workflow after creating a tag
Tags pushed with the default GITHUB_TOKEN don't trigger other workflows' push events, so release.yml never ran after tag.yml created a new tag. Add workflow_dispatch to release.yml and have tag.yml call `gh workflow run release.yml --ref <tag>` right after pushing the tag.
This commit is contained in:
@@ -5,6 +5,7 @@ on:
|
||||
# run only against tags
|
||||
tags:
|
||||
- '*'
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
@@ -15,6 +15,7 @@ on:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
actions: write
|
||||
|
||||
jobs:
|
||||
tag:
|
||||
@@ -43,5 +44,12 @@ jobs:
|
||||
git config user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git tag -a "${{ steps.semver.outputs.version }}" -m "Release ${{ steps.semver.outputs.version }}"
|
||||
git push origin "${{ steps.semver.outputs.version }}"
|
||||
- name: Trigger release workflow
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
TAG: ${{ steps.semver.outputs.version }}
|
||||
run: gh workflow run release.yml --ref "$TAG"
|
||||
- name: Summary
|
||||
run: echo "Created tag ${{ steps.semver.outputs.version }}" >> "$GITHUB_STEP_SUMMARY"
|
||||
env:
|
||||
TAG: ${{ steps.semver.outputs.version }}
|
||||
run: echo "Created tag $TAG" >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
Reference in New Issue
Block a user