@@ -52,26 +52,68 @@ jobs:
52
52
./gradlew clean build --refresh-keys --refresh-dependencies
53
53
./gradlew packageInstallers
54
54
working-directory : .
55
+
56
+ # get version from jar
57
+ - name : Set Version Unix
58
+ if : ${{ matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-13' }}
59
+ run : |
60
+ export VERSION=$(ls desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 | grep -Eo 'desktop-[0-9]+\.[0-9]+\.[0-9]+' | sed 's/desktop-//')
61
+ echo "VERSION=$VERSION" >> $GITHUB_ENV
62
+ - name : Set Version Windows
63
+ if : ${{ matrix.os == 'windows-latest' }}
64
+ run : |
65
+ $VERSION = (Get-ChildItem -Path desktop\build\temp-*/binaries\desktop-*.jar.SHA-256).Name -replace 'desktop-', '' -replace '-.*', ''
66
+ "VERSION=$VERSION" | Out-File -FilePath $env:GITHUB_ENV -Append
67
+ shell : powershell
68
+
55
69
- name : Move Release Files on Unix
56
70
if : ${{ matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-13' }}
57
71
run : |
58
72
mkdir ${{ github.workspace }}/release
59
73
if [ "${{ matrix.os }}" == "ubuntu-22.04" ]; then
60
- mv desktop/build/temp-*/binaries/haveno-*.rpm ${{ github.workspace }}/release
61
- mv desktop/build/temp-*/binaries/haveno_*.deb ${{ github.workspace }}/release
74
+ mkdir ${{ github.workspace }}/release-rpm
75
+ mkdir ${{ github.workspace }}/release-deb
76
+ mv desktop/build/temp-*/binaries/haveno-*.rpm ${{ github.workspace }}/release-rpm/Haveno-${{ env.VERSION }}-x86_64.rpm
77
+ mv desktop/build/temp-*/binaries/haveno_*.deb ${{ github.workspace }}/release-deb/Haveno-${{ env.VERSION }}-x86_64.deb
62
78
else
63
- mv desktop/build/temp-*/binaries/Haveno-*.dmg ${{ github.workspace }}/release
79
+ mv desktop/build/temp-*/binaries/Haveno-*.dmg ${{ github.workspace }}/release/Haveno-${{ env.VERSION }}.dmg
64
80
fi
65
- mv desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 ${{ github.workspace }}/release
81
+ cp desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 ${{ github.workspace }}/release
82
+ cp desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 ${{ github.workspace }}/release-deb
83
+ cp desktop/build/temp-*/binaries/desktop-*.jar.SHA-256 ${{ github.workspace }}/release-rpm
66
84
shell : bash
67
85
- name : Move Release Files on Windows
68
86
if : ${{ matrix.os == 'windows-latest' }}
69
87
run : |
70
88
mkdir ${{ github.workspace }}/release
71
- Move-Item -Path desktop\build\temp-*/binaries\Haveno-*.exe -Destination ${{ github.workspace }}/release
89
+ Move-Item -Path desktop\build\temp-*/binaries\Haveno-*.exe -Destination ${{ github.workspace }}/release/Haveno-${{ env.VERSION }}.exe
72
90
Move-Item -Path desktop\build\temp-*/binaries\desktop-*.jar.SHA-256 -Destination ${{ github.workspace }}/release
73
91
shell : powershell
92
+
93
+ # win
74
94
- uses : actions/upload-artifact@v3
95
+ name : " Windows artifacts"
96
+ if : ${{ matrix.os == 'windows-latest'}}
75
97
with :
76
- name : HavenoInstaller-${{ matrix.os }}
98
+ name : haveno-windows
77
99
path : ${{ github.workspace }}/release
100
+ # macos
101
+ - uses : actions/upload-artifact@v3
102
+ name : " macOS artifacts"
103
+ if : ${{ matrix.os == 'macos-13' }}
104
+ with :
105
+ name : haveno-macos
106
+ path : ${{ github.workspace }}/release
107
+ # linux
108
+ - uses : actions/upload-artifact@v3
109
+ name : " Linux - deb artifact"
110
+ if : ${{ matrix.os == 'ubuntu-22.04' }}
111
+ with :
112
+ name : haveno-linux-deb
113
+ path : ${{ github.workspace }}/release-deb
114
+ - uses : actions/upload-artifact@v3
115
+ name : " Linux - rpm artifact"
116
+ if : ${{ matrix.os == 'ubuntu-22.04' }}
117
+ with :
118
+ name : haveno-linux-rpm
119
+ path : ${{ github.workspace }}/release-rpm
0 commit comments