Skip to content

Commit e344b00

Browse files
woodserJabster28
andcommitted
update naming convention of artifact archives and installers
Co-authored-by: justynboyer@gmail.com <justynboyer@gmail.com>
1 parent b940021 commit e344b00

File tree

1 file changed

+48
-6
lines changed

1 file changed

+48
-6
lines changed

.github/workflows/build.yml

Lines changed: 48 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,26 +52,68 @@ jobs:
5252
./gradlew clean build --refresh-keys --refresh-dependencies
5353
./gradlew packageInstallers
5454
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+
5569
- name: Move Release Files on Unix
5670
if: ${{ matrix.os == 'ubuntu-22.04' || matrix.os == 'macos-13' }}
5771
run: |
5872
mkdir ${{ github.workspace }}/release
5973
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
6278
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
6480
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
6684
shell: bash
6785
- name: Move Release Files on Windows
6886
if: ${{ matrix.os == 'windows-latest' }}
6987
run: |
7088
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
7290
Move-Item -Path desktop\build\temp-*/binaries\desktop-*.jar.SHA-256 -Destination ${{ github.workspace }}/release
7391
shell: powershell
92+
93+
# win
7494
- uses: actions/upload-artifact@v3
95+
name: "Windows artifacts"
96+
if: ${{ matrix.os == 'windows-latest'}}
7597
with:
76-
name: HavenoInstaller-${{ matrix.os }}
98+
name: haveno-windows
7799
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

Comments
 (0)