Skip to content

Commit 1ceeb00

Browse files
committed
Create release
1 parent 3bfee4d commit 1ceeb00

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/build.yaml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ name: Build project
22
on:
33
workflow_dispatch:
44
push:
5+
tags:
6+
- v*
57
branches:
68
- master
79

@@ -51,6 +53,7 @@ jobs:
5153
with:
5254
path: rpm/RPMS/x86_64/LargeCsvReader-${{ env.APP_VERSION }}-1.x86_64.rpm
5355
name: rpm
56+
5457
build_win_installer:
5558
name: Build Windows installer
5659
needs:
@@ -73,3 +76,45 @@ jobs:
7376
with:
7477
path: windows/LargeCsvReaderSetup.exe
7578
name: win_installer
79+
80+
create_release:
81+
name: Create a release
82+
runs-on: ubuntu-latest
83+
if: startsWith(github.event.ref, 'refs/tags/v')
84+
needs:
85+
- package_windows
86+
- package_linux
87+
- package_macos
88+
- build_rpm
89+
- build_win_installer
90+
steps:
91+
- name: Extract Version Name
92+
id: extract_name
93+
uses: actions/github-script@v7
94+
with:
95+
result-encoding: string
96+
script: |
97+
return context.payload.ref.replace(/refs\/tags\/v/, '');
98+
- name: Download artifacts
99+
uses: actions/download-artifact@v4
100+
with:
101+
path: artifacts
102+
- name: Compress MacOS version
103+
run: 7z a -tzip {LargeCsvReader.zip} LargeCsvReader.app
104+
working-directory: artifacts
105+
- name: Create a Release
106+
id: create_release
107+
uses: softprops/action-gh-release@v2
108+
env:
109+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
110+
with:
111+
name: Release ${{ steps.extract_name.outputs.result }}
112+
draft: false
113+
prerelease: false
114+
generate_release_notes: true
115+
fail_on_unmatched_files: true
116+
body: |
117+
For Windows: Either the `LargeCsvReader.exe` (portable) or `LargeCsvReaderSetup.exe` (installer).
118+
For Linux: `LargeCsvReader-${{ steps.extract_name.outputs.result }}-1.x86_64.rpm` if your distribution supports RPM, otherwise `LargeCsvReader.tar.xz` (extract it somewhere and run `sudo make install`)
119+
For MacOS: `LargeCsvReader.zip`, extract `LargeCsvReader.app` anywhere you want and open it.
120+
files: artifacts/*

0 commit comments

Comments
 (0)