trigger-release #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow creates a Github release with changelog and release notes | |
name: Create Github Release | |
on: | |
repository_dispatch: | |
types: [trigger-release] | |
jobs: | |
github-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Git Config | |
run: |- | |
git config --global user.email "release@lukso.network" | |
git config --global user.name "LUKSO Bot" | |
- name: Set Version | |
run: |- | |
APP_VERSION="v$(node -pe "require('./package.json').version")" | |
echo "APP_VERSION=$APP_VERSION" >> $GITHUB_ENV | |
- uses: actions/checkout@v3 | |
with: | |
ref: develop | |
- name: Create and push Git Tag | |
run: |- | |
git tag -a ${{ env.APP_VERSION }} -m "Release Version ${{ env.APP_VERSION }}" | |
git push --set-upstream origin develop tag ${{ env.APP_VERSION }} | |
# Create Github Release | |
- name: Extract release notes from CHANGELOG | |
id: extract-release-notes | |
uses: ffurrer2/extract-release-notes@v1 | |
with: | |
release_notes_file: RELEASENOTES.md | |
- uses: jwalton/gh-find-current-pr@v1 | |
id: findPR | |
with: | |
state: closed | |
- name: Add PR body to Release Notes | |
env: | |
PR_BODY: ${{ steps.findPR.outputs.body }} | |
run: |- | |
echo ${PR_BODY}|cat - RELEASENOTES.md > /tmp/out && mv /tmp/out RELEASENOTES.md | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "ios/LSPSmartContracts.swift" | |
bodyFile: "RELEASENOTES.md" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
tag: ${{ env.APP_VERSION }} |