Skip to content

Commit 7c5403b

Browse files
authored
Merge pull request #7 from bookernath/copilot/fix-01edcd33-c269-46ec-87e2-d5493c922141
Fix GitHub Actions deprecation warning for set-output command
2 parents ba93530 + b02e38f commit 7c5403b

1 file changed

Lines changed: 29 additions & 20 deletions

File tree

.github/workflows/release.yml

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -188,27 +188,36 @@ jobs:
188188
echo "EOF" >> $GITHUB_OUTPUT
189189
190190
- name: Create GitHub Release
191-
uses: actions/create-release@v1
192191
env:
193-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
194-
with:
195-
tag_name: v${{ env.NEW_VERSION }}
196-
release_name: Release v${{ env.NEW_VERSION }}
197-
body: |
198-
## Changes in v${{ env.NEW_VERSION }}
199-
200-
${{ steps.changelog.outputs.changelog }}
201-
202-
## Installation
203-
204-
```bash
205-
npm install cached-middleware-fetch-next@${{ env.NEW_VERSION }}
206-
```
207-
208-
## What's Changed
209-
Full Changelog: https://github.com/${{ github.repository }}/compare/${{ github.event.before }}..v${{ env.NEW_VERSION }}
210-
draft: false
211-
prerelease: ${{ contains(env.NEW_VERSION, '-') }}
192+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
193+
run: |
194+
# Create release notes
195+
cat > release_notes.md << 'EOF'
196+
## Changes in v${{ env.NEW_VERSION }}
197+
198+
${{ steps.changelog.outputs.changelog }}
199+
200+
## Installation
201+
202+
```bash
203+
npm install cached-middleware-fetch-next@${{ env.NEW_VERSION }}
204+
```
205+
206+
## What's Changed
207+
Full Changelog: https://github.com/${{ github.repository }}/compare/${{ github.event.before }}..v${{ env.NEW_VERSION }}
208+
EOF
209+
210+
# Create the release
211+
if [[ "${{ env.NEW_VERSION }}" == *"-"* ]]; then
212+
gh release create "v${{ env.NEW_VERSION }}" \
213+
--title "Release v${{ env.NEW_VERSION }}" \
214+
--notes-file release_notes.md \
215+
--prerelease
216+
else
217+
gh release create "v${{ env.NEW_VERSION }}" \
218+
--title "Release v${{ env.NEW_VERSION }}" \
219+
--notes-file release_notes.md
220+
fi
212221
213222
- name: Publish to NPM
214223
env:

0 commit comments

Comments
 (0)