Skip to content

ci: fix publish step #29

ci: fix publish step

ci: fix publish step #29

name: 'Create Release'
on:
push:
branches:
- 'main'
jobs:
create-release:
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
actions: write
steps:
- uses: actions/checkout@v3
- name: Semantic Release
uses: cycjimmy/semantic-release-action@v3
id: semantic
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Dispatch publish workflow
if: steps.semantic.outputs.new_release_published == 'true'
uses: actions/github-script@v6
with:
script: |
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'publish.yaml',
ref: '${{ steps.semantic.outputs.new_release_git_tag }}',
})