action-gh-release
Add the install commands to every release that softprops/action-gh-release creates in GitHub Actions.
action-gh-release creates the release from your workflow. With generate_release_notes, it puts body above the notes that GitHub generates. github.repository fills in your repository, so the step works as it is:
- uses: softprops/action-gh-release@v3
with:
files: dist/*
generate_release_notes: true
body: |
## Install
**macOS & Linux**
```sh
curl -fsSL https://installer.dev/${{ github.repository }}/install.sh | sh
```
**Windows** (PowerShell)
```powershell
irm https://installer.dev/${{ github.repository }}/install.ps1 | iex
```Keep your own files and other inputs. To install exactly this release, add ?version=${{ github.ref_name }} to each URL. That works when a tag push triggers the workflow.
Check the result
Run the workflow with draft: true once. The step creates a draft release that only collaborators see. Check the section on the Releases page, then delete the draft or publish it.