Skip to content

Commit

Permalink
feat(wallet): Make GH Releases for wallet production releases (#3954)
Browse files Browse the repository at this point in the history
* feat(wallet): Make GH Releases for wallet production releases

* upload artifact again

* fmt

* fmt with dprint

* chore: Always create drafted releases

* chore: Temporary add `workflow_dipsatch` for testing purposes

* chore: Remove `workflow_dipsatch`

* chore: Pin `@elgohr/create-release`
  • Loading branch information
marc2332 authored Nov 27, 2024
1 parent e435aa5 commit 82e585b
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/apps_wallet_prod_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,48 @@ jobs:
echo "artifact_name=${artifact_name}" >> $GITHUB_ENV
- name: Build Wallet
run: pnpm wallet build
- 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@c5ea99036abb741a89f8bf1f2cd7fba845e3313a # pin@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ env.CURRENT_TAG }}
release_name: IOTA Wallet v${{ steps.version.outputs.version }}
body: |
## Changelog
{{ env.changelog }}
draft: true
prerelease: false
- name: Upload artifacts
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # pin@v4
with:
Expand Down

0 comments on commit 82e585b

Please sign in to comment.