Skip to content

Commit

Permalink
Update build-linux.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
timamus authored Jul 24, 2024
1 parent 4134078 commit a15d116
Showing 1 changed file with 37 additions and 1 deletion.
38 changes: 37 additions & 1 deletion .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,21 @@ jobs:
- name: Test
run: cat Release.txt

- name: Release
release:
name: Create Release
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Download Build Artifacts
uses: actions/download-artifact@v2
with:
name: qchatgpt
path: dist/electron/Packaged/

- name: Create Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
Expand All @@ -56,3 +70,25 @@ jobs:
LICENSE
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}

publish:
name: Publish Release
needs: release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Publish Release
env:
GH_TOKEN: ${{ github.token }}
GH_REPO: ${{ github.repository }}
run: gh release edit "${{ github.ref_name }}" --draft=false

- name: Cleanup Old Releases
uses: eregon/keep-last-n-releases@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
with:
n: 3
remove_tags_without_release: true

0 comments on commit a15d116

Please sign in to comment.