diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index bf242600..4967eeef 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -26,7 +26,7 @@ jobs: - name: Get tag name ( Workflow Run ) id: latest_tag uses: actions/github-script@v7 - if: ${{ github.event_name }} == 'workflow_run' + if: github.event_name == 'workflow_run' with: script: | const releases = await github.rest.repos.listReleases({ @@ -34,11 +34,11 @@ jobs: repo: context.repo.repo, per_page: 1 }); - return releases.data[0].tag_name; + core.setOutput('result', releases.data[0].tag_name); result-encoding: string - name: Set tag name ( Workflow Run ) - if: ${{ github.event_name }} == 'workflow_run' + if: github.event_name == 'workflow_run' run: echo "tag_name=${{ steps.latest_tag.outputs.result }}" >> $GITHUB_ENV - name: Set tag name ( Workflow Dispatch )