1+ name : Build and Release Binaries
2+
3+ on :
4+ push :
5+ branches : [main]
6+ workflow_dispatch :
7+
8+ env :
9+ DOTNET_VERSION : ' 9.0.x'
10+ DOTNET_NOLOGO : true
11+ DOTNET_CLI_TELEMETRY_OPTOUT : true
12+
13+ jobs :
14+ build :
15+ name : Build binaries for all platforms
16+ runs-on : ubuntu-latest
17+ permissions :
18+ contents : write
19+ packages : write
20+
21+ steps :
22+ - name : Checkout code
23+ uses : actions/checkout@v4
24+
25+ - name : Setup .NET
26+ uses : actions/setup-dotnet@v4
27+ with :
28+ dotnet-version : ${{ env.DOTNET_VERSION }}
29+
30+ - name : Get version from Directory.Build.props
31+ id : version
32+ run : |
33+ VERSION=$(grep -oP '(?<=<Version>)[^<]+' Directory.Build.props)
34+ echo "version=${VERSION}" >> $GITHUB_OUTPUT
35+ echo "Building version: ${VERSION}"
36+
37+ - name : Restore dependencies
38+ run : dotnet restore Neo4jExport/Neo4jExport.fsproj
39+
40+ - name : Build macOS Apple Silicon (osx-arm64)
41+ run : |
42+ dotnet publish Neo4jExport/Neo4jExport.fsproj \
43+ -c Release \
44+ -r osx-arm64 \
45+ --self-contained true \
46+ -p:PublishSingleFile=true \
47+ -p:IncludeNativeLibrariesForSelfExtract=true \
48+ -p:PublishReadyToRun=false \
49+ -p:EnableCompressionInSingleFile=true \
50+ -p:DebugType=embedded \
51+ -o ./publish/macos-apple-silicon
52+
53+ - name : Build macOS Intel (osx-x64)
54+ run : |
55+ dotnet publish Neo4jExport/Neo4jExport.fsproj \
56+ -c Release \
57+ -r osx-x64 \
58+ --self-contained true \
59+ -p:PublishSingleFile=true \
60+ -p:IncludeNativeLibrariesForSelfExtract=true \
61+ -p:PublishReadyToRun=false \
62+ -p:EnableCompressionInSingleFile=true \
63+ -p:DebugType=embedded \
64+ -o ./publish/macos-intel
65+
66+ - name : Build Linux AMD64 (linux-x64)
67+ run : |
68+ dotnet publish Neo4jExport/Neo4jExport.fsproj \
69+ -c Release \
70+ -r linux-x64 \
71+ --self-contained true \
72+ -p:PublishSingleFile=true \
73+ -p:IncludeNativeLibrariesForSelfExtract=true \
74+ -p:PublishReadyToRun=true \
75+ -p:EnableCompressionInSingleFile=true \
76+ -p:DebugType=embedded \
77+ -o ./publish/linux-amd64
78+
79+ - name : Build Linux ARM64 (linux-arm64)
80+ run : |
81+ dotnet publish Neo4jExport/Neo4jExport.fsproj \
82+ -c Release \
83+ -r linux-arm64 \
84+ --self-contained true \
85+ -p:PublishSingleFile=true \
86+ -p:IncludeNativeLibrariesForSelfExtract=true \
87+ -p:PublishReadyToRun=true \
88+ -p:EnableCompressionInSingleFile=true \
89+ -p:DebugType=embedded \
90+ -o ./publish/linux-arm64
91+
92+ - name : Build Windows x64 (win-x64)
93+ run : |
94+ dotnet publish Neo4jExport/Neo4jExport.fsproj \
95+ -c Release \
96+ -r win-x64 \
97+ --self-contained true \
98+ -p:PublishSingleFile=true \
99+ -p:IncludeNativeLibrariesForSelfExtract=true \
100+ -p:PublishReadyToRun=true \
101+ -p:EnableCompressionInSingleFile=true \
102+ -p:DebugType=embedded \
103+ -o ./publish/windows-x64
104+
105+ - name : Build Windows ARM64 (win-arm64)
106+ run : |
107+ dotnet publish Neo4jExport/Neo4jExport.fsproj \
108+ -c Release \
109+ -r win-arm64 \
110+ --self-contained true \
111+ -p:PublishSingleFile=true \
112+ -p:IncludeNativeLibrariesForSelfExtract=true \
113+ -p:PublishReadyToRun=false \
114+ -p:EnableCompressionInSingleFile=true \
115+ -p:DebugType=embedded \
116+ -o ./publish/windows-arm64
117+
118+ - name : Rename binaries
119+ run : |
120+ mv ./publish/macos-apple-silicon/neo4j-export ./publish/neo4j-export-darwin-arm64
121+ mv ./publish/macos-intel/neo4j-export ./publish/neo4j-export-darwin-amd64
122+ mv ./publish/linux-amd64/neo4j-export ./publish/neo4j-export-linux-amd64
123+ mv ./publish/linux-arm64/neo4j-export ./publish/neo4j-export-linux-arm64
124+ mv ./publish/windows-x64/neo4j-export.exe ./publish/neo4j-export-windows-amd64.exe
125+ mv ./publish/windows-arm64/neo4j-export.exe ./publish/neo4j-export-windows-arm64.exe
126+
127+ - name : Create checksums
128+ run : |
129+ cd ./publish
130+ sha256sum neo4j-export-* > checksums.txt
131+ cat checksums.txt
132+
133+ - name : Upload artifacts
134+ uses : actions/upload-artifact@v4
135+ with :
136+ name : neo4j-export-binaries
137+ path : |
138+ ./publish/neo4j-export-*
139+ ./publish/checksums.txt
140+ retention-days : 90
141+
142+ - name : Create Release
143+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
144+ uses : softprops/action-gh-release@v2
145+ with :
146+ tag_name : v${{ steps.version.outputs.version }}-${{ github.run_number }}
147+ name : Release v${{ steps.version.outputs.version }}-${{ github.run_number }}
148+ draft : false
149+ prerelease : false
150+ generate_release_notes : true
151+ files : |
152+ ./publish/neo4j-export-*
153+ ./publish/checksums.txt
154+ body : |
155+ ## Neo4j Export Tool v${{ steps.version.outputs.version }}
156+
157+ ### Downloads
158+
159+ | Platform | Architecture | Download |
160+ |----------|--------------|----------|
161+ | macOS | Apple Silicon (ARM64) | [neo4j-export-darwin-arm64](https://github.com/${{ github.repository }}/releases/download/v${{ steps.version.outputs.version }}-${{ github.run_number }}/neo4j-export-darwin-arm64) |
162+ | macOS | Intel (x64) | [neo4j-export-darwin-amd64](https://github.com/${{ github.repository }}/releases/download/v${{ steps.version.outputs.version }}-${{ github.run_number }}/neo4j-export-darwin-amd64) |
163+ | Linux | x64 | [neo4j-export-linux-amd64](https://github.com/${{ github.repository }}/releases/download/v${{ steps.version.outputs.version }}-${{ github.run_number }}/neo4j-export-linux-amd64) |
164+ | Linux | ARM64 | [neo4j-export-linux-arm64](https://github.com/${{ github.repository }}/releases/download/v${{ steps.version.outputs.version }}-${{ github.run_number }}/neo4j-export-linux-arm64) |
165+ | Windows | x64 | [neo4j-export-windows-amd64.exe](https://github.com/${{ github.repository }}/releases/download/v${{ steps.version.outputs.version }}-${{ github.run_number }}/neo4j-export-windows-amd64.exe) |
166+ | Windows | ARM64 | [neo4j-export-windows-arm64.exe](https://github.com/${{ github.repository }}/releases/download/v${{ steps.version.outputs.version }}-${{ github.run_number }}/neo4j-export-windows-arm64.exe) |
167+
168+ ### Installation
169+
170+ 1. Download the appropriate binary for your platform
171+ 2. Make it executable (macOS/Linux): `chmod +x neo4j-export-*`
172+ 3. Move to your PATH or run directly
173+
174+ ### Verify checksums
175+
176+ Download `checksums.txt` and verify:
177+ ```bash
178+ sha256sum -c checksums.txt
179+ ```
0 commit comments