Skip to content

Commit 7e12d13

Browse files
authored
chore: fix releases, make sure it's tested on PRs too (#25)
1 parent 94071c6 commit 7e12d13

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

.github/workflows/release.yml

+30-1
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,12 @@ jobs:
141141

142142
release:
143143
name: push
144-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
145144
needs: [build, create-checksums]
146145
runs-on: ubuntu-latest
147146
steps:
148147
- uses: actions/checkout@v4
148+
with:
149+
fetch-depth: 0
149150
- uses: actions/download-artifact@v4
150151
with:
151152
path: artifacts
@@ -174,8 +175,36 @@ jobs:
174175
echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
175176
cat version_changelog.txt >> $GITHUB_OUTPUT
176177
echo "EOF" >> $GITHUB_OUTPUT
178+
env:
179+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
180+
181+
- name: create (dry run)
182+
if: ${{ !(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) }}
183+
run: |
184+
cat <<EOF
185+
## Changes in ${{ steps.get_version.outputs.VERSION }}
186+
187+
${{ steps.changelog.outputs.CHANGELOG }}
188+
189+
## Installation
190+
191+
Download the appropriate binary for your system and architecture:
192+
193+
| Platform | Architecture | Download |
194+
| -------- | ------------ | -------- |
195+
| macOS | x86_64 | [circe-x86_64-apple-darwin.tar.gz](https://github.com/fossas/circe/releases/download/${{ steps.get_version.outputs.VERSION }}/circe-x86_64-apple-darwin.tar.gz) |
196+
| macOS | arm64 | [circe-aarch64-apple-darwin.tar.gz](https://github.com/fossas/circe/releases/download/${{ steps.get_version.outputs.VERSION }}/circe-aarch64-apple-darwin.tar.gz) |
197+
| Linux | x86_64 | [circe-x86_64-unknown-linux-gnu.tar.gz](https://github.com/fossas/circe/releases/download/${{ steps.get_version.outputs.VERSION }}/circe-x86_64-unknown-linux-gnu.tar.gz) |
198+
| Linux | arm64 | [circe-aarch64-unknown-linux-gnu.tar.gz](https://github.com/fossas/circe/releases/download/${{ steps.get_version.outputs.VERSION }}/circe-aarch64-unknown-linux-gnu.tar.gz) |
199+
| Linux | x86_64 (musl) | [circe-x86_64-unknown-linux-musl.tar.gz](https://github.com/fossas/circe/releases/download/${{ steps.get_version.outputs.VERSION }}/circe-x86_64-unknown-linux-musl.tar.gz) |
200+
| Linux | arm64 (musl) | [circe-aarch64-unknown-linux-musl.tar.gz](https://github.com/fossas/circe/releases/download/${{ steps.get_version.outputs.VERSION }}/circe-aarch64-unknown-linux-musl.tar.gz) |
201+
| Windows | x86_64 | [circe-x86_64-pc-windows-msvc.zip](https://github.com/fossas/circe/releases/download/${{ steps.get_version.outputs.VERSION }}/circe-x86_64-pc-windows-msvc.zip) |
202+
203+
See [checksums.txt](https://github.com/fossas/circe/releases/download/${{ steps.get_version.outputs.VERSION }}/checksums.txt) for file checksums.
204+
EOF
177205
178206
- name: create
207+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
179208
uses: softprops/action-gh-release@v1
180209
with:
181210
files: |

0 commit comments

Comments
 (0)