Skip to content

Commit

Permalink
feat(wallet): Make GH Releases for wallet production releases
Browse files Browse the repository at this point in the history
  • Loading branch information
marc2332 committed Nov 7, 2024
1 parent 8b277f0 commit 705d4c9
Showing 1 changed file with 41 additions and 5 deletions.
46 changes: 41 additions & 5 deletions .github/workflows/apps_wallet_prod_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,45 @@ jobs:
echo "artifact_name=${artifact_name}" >> $GITHUB_ENV
- name: Build Wallet
run: pnpm wallet build
- name: Upload artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4
- name: Get Previous Tag
id: prev_tag
run: |
tags=$(git tag --list 'wallet-v*.*.*' --sort=-creatordate)
current_tag=$(echo "$tags" | sed -n 1p)
prev_tag=$(echo "$tags" | sed -n 2p)
if [ -z "$prev_tag" ]; then
echo "No previous tag found. Skipping changelog generation."
echo "PREV_TAG=none" >> $GITHUB_ENV
else
echo "PREV_TAG=$prev_tag" >> $GITHUB_ENV
fi
echo "CURRENT_TAG=$current_tag" >> $GITHUB_ENV
- name: Generate Changelog
id: generate_changelog
run: |
if [ "${{ env.PREV_TAG }}" = "none" ]; then
echo "No previous tag found. Skipping changelog generation."
echo "changelog=No previous tag found. Changelog generation skipped." >> $GITHUB_ENV
else
git log ${{ env.PREV_TAG }}..${{ env.CURRENT_TAG }} --pretty=format:"- %s by @%an in #%h" -- ./apps/wallet > CHANGELOG.md
changelog=$(cat CHANGELOG.md)
echo "changelog=$changelog" >> $GITHUB_ENV
fi
- name: Get version from tag
id: version
run: echo "::set-output name=version::${GITHUB_REF#refs/tags/wallet-v}"

- name: Create GitHub Release
uses: elgohr/create-release@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
name: ${{ env.artifact_name }}
path: |
./apps/wallet/dist
tag_name: ${{ env.CURRENT_TAG }}
release_name: IOTA Wallet v${{ steps.version.outputs.version }}
body: |
## Changelog
{{ env.changelog }}
draft: false
prerelease: false

0 comments on commit 705d4c9

Please sign in to comment.