Skip to content

Commit

Permalink
chore: add downloadable bot comment (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
ignatiusmb authored Sep 27, 2024
1 parent e6dd90a commit 8601c9c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,22 @@ jobs:
name: extension-${{ github.sha }}
path: workspace/extension/build/svelte-devtools.zip

- if: github.event_name == 'pull_request'
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
WORKFLOW: ${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts
run: |
url=https://github.com/$WORKFLOW/$(gh api repos/$WORKFLOW --jq '.artifacts[0].id')
commented=$(gh pr view $PR_NUMBER --json comments --jq '.comments[].author.login | select(. | contains("github-actions"))')
body="Try the changes in this PR by [side-loading the built extension]($url). :rocket:"
if [ -z "$commented" ]; then
gh pr comment $PR_NUMBER --body "$body"
else
gh pr comment $PR_NUMBER --edit-last --body "$body"
fi
publish:
runs-on: ubuntu-latest
needs: [manifest, bundle]
Expand Down

0 comments on commit 8601c9c

Please sign in to comment.