Skip to content

Commit

Permalink
chore(ci): use gh cli to create releases
Browse files Browse the repository at this point in the history
  • Loading branch information
ocavue committed Jul 22, 2022
1 parent f94b8d4 commit 5f09827
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,21 +233,27 @@ jobs:
echo "Current app version is $RINO_APP_VERSION"
echo "RINO_APP_VERSION=$RINO_APP_VERSION" >> $GITHUB_ENV
- name: Create GitHub release
uses: ncipollo/release-action@v1
if: ${{ github.ref == 'refs/heads/changeset-release/master' || github.ref == 'refs/heads/master' }}
continue-on-error: true
with:
allowUpdates: true
draft: true
omitBodyDuringUpdate: true
name: "${{ env.RINO_APP_VERSION }}"
tag: "${{ env.RINO_APP_VERSION }}"
body: |
- name: Prepare GitHub release note
run: |
echo "$RINO_RELEASE_NOTE" > /tmp/rino-release-notes.md
env:
RINO_RELEASE_NOTE: |
This is a release for the desktop app.
Please refer to [CHANGELOG.md](https://github.com/ocavue/rino/blob/${{ env.RINO_APP_VERSION }}/packages/electron/CHANGELOG.md) for details.
- name: Print GitHub release note
run: |
cat /tmp/rino-release-notes.md
- name: Create GitHub release
if: ${{ github.ref == 'refs/heads/changeset-release/master' || github.ref == 'refs/heads/master' }}
# Create a draft release if not exists
run: |
gh release view "${RINO_APP_VERSION}" || gh release create "${RINO_APP_VERSION}" --title "${RINO_APP_VERSION}" --draft --notes-file /tmp/rino-release-notes.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

release:
runs-on: ubuntu-latest
concurrency: global_concurrency_release
Expand Down

0 comments on commit 5f09827

Please sign in to comment.