Skip to content

Commit 2151f9b

Browse files
committed
perf: update github action workflows
1 parent 2f5d1e1 commit 2151f9b

File tree

4 files changed

+26
-16
lines changed

4 files changed

+26
-16
lines changed

.github/workflows/release-linux.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,13 +90,13 @@ jobs:
9090
cd build/linux
9191
mv tiny-rdm_0.0.0_amd64 "tiny-rdm_${{ steps.normalise_version.outputs.version }}_amd64"
9292
sed -i 's/0.0.0/${{ steps.normalise_version.outputs.version }}/g' "tiny-rdm_${{ steps.normalise_version.outputs.version }}_amd64/DEBIAN/control"
93-
dpkg-deb --build -zXZ "tiny-rdm_${{ steps.normalise_version.outputs.version }}_amd64"
93+
dpkg-deb --build -Zxz "tiny-rdm_${{ steps.normalise_version.outputs.version }}_amd64"
9494
9595
- name: Upload release asset
9696
shell: bash
97+
working-directory: ./build/linux/
9798
run: |
9899
filepath="tiny-rdm_${{ steps.normalise_version.outputs.version }}_amd64.deb"
99100
filename="tiny-rdm_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.deb"
100101
upload_url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets"
101102
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/octet-stream" --data-binary @$filepath "$upload_url?name=$filename"
102-
working-directory: ./build/linux/

.github/workflows/release-macos.yaml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,24 +77,33 @@ jobs:
7777

7878
- name: Compress macOS app
7979
shell: bash
80+
working-directory: ./build/bin
8081
run: |
81-
cd build/bin
8282
mv tinyrdm.app "Tiny RDM.app"
8383
zip -r TinyRDM-${{ steps.normalise_platform.outputs.tag }}.zip "Tiny RDM.app"
8484
85-
- name: Get latest release from API
86-
id: get_upload_url
87-
shell: bash
88-
run: |
89-
curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases" > /tmp/releases.json
90-
url=$(jq -r '.[0].upload_url' /tmp/releases.json)
91-
echo "url=${url/%{?name,label}/}" >> "$GITHUB_OUTPUT"
92-
93-
- name: Upload release asset
85+
- name: Upload release asset (ZIP Package)
9486
shell: bash
87+
working-directory: ./build/bin/
9588
run: |
9689
filepath="TinyRDM-${{ steps.normalise_platform.outputs.tag }}.zip"
9790
filename="TinyRDM_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.zip"
9891
upload_url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets"
9992
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/zip" --data-binary @$filepath "$upload_url?name=$filename"
93+
94+
- name: Build macOS DMG
95+
shell: bash
96+
working-directory: ./build/bin
97+
run: |
98+
rm TinyRDM-${{ steps.normalise_platform.outputs.tag }}.zip
99+
ln -s /Applications Applications
100+
hdiutil create -volname "Tiny RDM" -srcfolder . -ov -format UDBZ TinyRDM-${{ steps.normalise_platform.outputs.tag }}.dmg
101+
102+
- name: Upload release asset (DMG Package)
103+
shell: bash
100104
working-directory: ./build/bin/
105+
run: |
106+
filepath="TinyRDM-${{ steps.normalise_platform.outputs.tag }}.dmg"
107+
filename="TinyRDM_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.dmg"
108+
upload_url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets"
109+
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/x-apple-diskimage" --data-binary @$filepath "$upload_url?name=$filename"

.github/workflows/release-windows.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,37 +62,37 @@ jobs:
6262
run: CGO_ENABLED=1 wails build -clean -platform ${{ matrix.platform }} -ldflags "-X main.version=${{ github.event.release.tag_name }}"
6363

6464
- name: Compress portable binary
65-
run: Compress-Archive "Tiny RDM.exe" tiny-rdm.zip
6665
working-directory: ./build/bin
66+
run: Compress-Archive "Tiny RDM.exe" tiny-rdm.zip
6767

6868
- name: Upload release asset (Portable)
6969
shell: bash
70+
working-directory: ./build/bin
7071
run: |
7172
filepath="tiny-rdm.zip"
7273
filename="TinyRDM_Portable_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.zip"
7374
upload_url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets"
7475
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/zip" --data-binary @$filepath "$upload_url?name=$filename"
75-
working-directory: ./build/bin
7676
7777
- name: Build Windows NSIS installer
7878
shell: bash
7979
run: CGO_ENABLED=1 wails build -clean -platform ${{ matrix.platform }} -nsis -ldflags "-X main.version=${{ github.event.release.tag_name }}"
8080

8181
- name: Codesign Windows NSIS installer
82+
working-directory: ./build/bin
8283
run: |
8384
echo "Creating certificate file"
8485
New-Item -ItemType directory -Path certificate
8586
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WIN_SIGNING_CERT }}'
8687
certutil -decode certificate\certificate.txt certificate\certificate.pfx
8788
echo "Signing TinyRDM installer"
8889
& 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /fd sha256 /tr http://ts.ssl.com /f certificate\certificate.pfx /p '${{ secrets.WIN_SIGNING_CERT_PASSWORD }}' TinyRDM-amd64-installer.exe
89-
working-directory: ./build/bin
9090
9191
- name: Upload release asset (Installer)
9292
shell: bash
93+
working-directory: ./build/bin/
9394
run: |
9495
filepath="TinyRDM-amd64-installer.exe"
9596
filename="TinyRDM_Setup_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.exe"
9697
upload_url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets"
9798
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/octet-stream" --data-binary @$filepath "$upload_url?name=$filename"
98-
working-directory: ./build/bin/

build/linux/tiny-rdm_0.0.0_amd64/DEBIAN/control

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
Package: {{.Name}}
22
Version: {{.Info.ProductVersion}}
33
Section: base
4+
Depends: libc6 (>= 2.34), libc6 (>= 2.32)
45
Priority: optional
56
Architecture: amd64
67
Maintainer: {{.Author.Name}} <{{.Author.Email}}>

0 commit comments

Comments
 (0)