perf: update github action workflows
This commit is contained in:
parent
2f5d1e1d51
commit
2151f9b1b4
|
@ -90,13 +90,13 @@ jobs:
|
||||||
cd build/linux
|
cd build/linux
|
||||||
mv tiny-rdm_0.0.0_amd64 "tiny-rdm_${{ steps.normalise_version.outputs.version }}_amd64"
|
mv tiny-rdm_0.0.0_amd64 "tiny-rdm_${{ steps.normalise_version.outputs.version }}_amd64"
|
||||||
sed -i 's/0.0.0/${{ steps.normalise_version.outputs.version }}/g' "tiny-rdm_${{ steps.normalise_version.outputs.version }}_amd64/DEBIAN/control"
|
sed -i 's/0.0.0/${{ steps.normalise_version.outputs.version }}/g' "tiny-rdm_${{ steps.normalise_version.outputs.version }}_amd64/DEBIAN/control"
|
||||||
dpkg-deb --build -zXZ "tiny-rdm_${{ steps.normalise_version.outputs.version }}_amd64"
|
dpkg-deb --build -Zxz "tiny-rdm_${{ steps.normalise_version.outputs.version }}_amd64"
|
||||||
|
|
||||||
- name: Upload release asset
|
- name: Upload release asset
|
||||||
shell: bash
|
shell: bash
|
||||||
|
working-directory: ./build/linux/
|
||||||
run: |
|
run: |
|
||||||
filepath="tiny-rdm_${{ steps.normalise_version.outputs.version }}_amd64.deb"
|
filepath="tiny-rdm_${{ steps.normalise_version.outputs.version }}_amd64.deb"
|
||||||
filename="tiny-rdm_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.deb"
|
filename="tiny-rdm_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.deb"
|
||||||
upload_url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets"
|
upload_url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets"
|
||||||
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/octet-stream" --data-binary @$filepath "$upload_url?name=$filename"
|
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/octet-stream" --data-binary @$filepath "$upload_url?name=$filename"
|
||||||
working-directory: ./build/linux/
|
|
||||||
|
|
|
@ -77,24 +77,33 @@ jobs:
|
||||||
|
|
||||||
- name: Compress macOS app
|
- name: Compress macOS app
|
||||||
shell: bash
|
shell: bash
|
||||||
|
working-directory: ./build/bin
|
||||||
run: |
|
run: |
|
||||||
cd build/bin
|
|
||||||
mv tinyrdm.app "Tiny RDM.app"
|
mv tinyrdm.app "Tiny RDM.app"
|
||||||
zip -r TinyRDM-${{ steps.normalise_platform.outputs.tag }}.zip "Tiny RDM.app"
|
zip -r TinyRDM-${{ steps.normalise_platform.outputs.tag }}.zip "Tiny RDM.app"
|
||||||
|
|
||||||
- name: Get latest release from API
|
- name: Upload release asset (ZIP Package)
|
||||||
id: get_upload_url
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
curl -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/${GITHUB_REPOSITORY}/releases" > /tmp/releases.json
|
|
||||||
url=$(jq -r '.[0].upload_url' /tmp/releases.json)
|
|
||||||
echo "url=${url/%{?name,label}/}" >> "$GITHUB_OUTPUT"
|
|
||||||
|
|
||||||
- name: Upload release asset
|
|
||||||
shell: bash
|
shell: bash
|
||||||
|
working-directory: ./build/bin/
|
||||||
run: |
|
run: |
|
||||||
filepath="TinyRDM-${{ steps.normalise_platform.outputs.tag }}.zip"
|
filepath="TinyRDM-${{ steps.normalise_platform.outputs.tag }}.zip"
|
||||||
filename="TinyRDM_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.zip"
|
filename="TinyRDM_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.zip"
|
||||||
upload_url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets"
|
upload_url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets"
|
||||||
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/zip" --data-binary @$filepath "$upload_url?name=$filename"
|
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/zip" --data-binary @$filepath "$upload_url?name=$filename"
|
||||||
|
|
||||||
|
- name: Build macOS DMG
|
||||||
|
shell: bash
|
||||||
|
working-directory: ./build/bin
|
||||||
|
run: |
|
||||||
|
rm TinyRDM-${{ steps.normalise_platform.outputs.tag }}.zip
|
||||||
|
ln -s /Applications Applications
|
||||||
|
hdiutil create -volname "Tiny RDM" -srcfolder . -ov -format UDBZ TinyRDM-${{ steps.normalise_platform.outputs.tag }}.dmg
|
||||||
|
|
||||||
|
- name: Upload release asset (DMG Package)
|
||||||
|
shell: bash
|
||||||
working-directory: ./build/bin/
|
working-directory: ./build/bin/
|
||||||
|
run: |
|
||||||
|
filepath="TinyRDM-${{ steps.normalise_platform.outputs.tag }}.dmg"
|
||||||
|
filename="TinyRDM_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.dmg"
|
||||||
|
upload_url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets"
|
||||||
|
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/x-apple-diskimage" --data-binary @$filepath "$upload_url?name=$filename"
|
||||||
|
|
|
@ -62,23 +62,24 @@ jobs:
|
||||||
run: CGO_ENABLED=1 wails build -clean -platform ${{ matrix.platform }} -ldflags "-X main.version=${{ github.event.release.tag_name }}"
|
run: CGO_ENABLED=1 wails build -clean -platform ${{ matrix.platform }} -ldflags "-X main.version=${{ github.event.release.tag_name }}"
|
||||||
|
|
||||||
- name: Compress portable binary
|
- name: Compress portable binary
|
||||||
run: Compress-Archive "Tiny RDM.exe" tiny-rdm.zip
|
|
||||||
working-directory: ./build/bin
|
working-directory: ./build/bin
|
||||||
|
run: Compress-Archive "Tiny RDM.exe" tiny-rdm.zip
|
||||||
|
|
||||||
- name: Upload release asset (Portable)
|
- name: Upload release asset (Portable)
|
||||||
shell: bash
|
shell: bash
|
||||||
|
working-directory: ./build/bin
|
||||||
run: |
|
run: |
|
||||||
filepath="tiny-rdm.zip"
|
filepath="tiny-rdm.zip"
|
||||||
filename="TinyRDM_Portable_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.zip"
|
filename="TinyRDM_Portable_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.zip"
|
||||||
upload_url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets"
|
upload_url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets"
|
||||||
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/zip" --data-binary @$filepath "$upload_url?name=$filename"
|
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/zip" --data-binary @$filepath "$upload_url?name=$filename"
|
||||||
working-directory: ./build/bin
|
|
||||||
|
|
||||||
- name: Build Windows NSIS installer
|
- name: Build Windows NSIS installer
|
||||||
shell: bash
|
shell: bash
|
||||||
run: CGO_ENABLED=1 wails build -clean -platform ${{ matrix.platform }} -nsis -ldflags "-X main.version=${{ github.event.release.tag_name }}"
|
run: CGO_ENABLED=1 wails build -clean -platform ${{ matrix.platform }} -nsis -ldflags "-X main.version=${{ github.event.release.tag_name }}"
|
||||||
|
|
||||||
- name: Codesign Windows NSIS installer
|
- name: Codesign Windows NSIS installer
|
||||||
|
working-directory: ./build/bin
|
||||||
run: |
|
run: |
|
||||||
echo "Creating certificate file"
|
echo "Creating certificate file"
|
||||||
New-Item -ItemType directory -Path certificate
|
New-Item -ItemType directory -Path certificate
|
||||||
|
@ -86,13 +87,12 @@ jobs:
|
||||||
certutil -decode certificate\certificate.txt certificate\certificate.pfx
|
certutil -decode certificate\certificate.txt certificate\certificate.pfx
|
||||||
echo "Signing TinyRDM installer"
|
echo "Signing TinyRDM installer"
|
||||||
& '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
|
& '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
|
||||||
working-directory: ./build/bin
|
|
||||||
|
|
||||||
- name: Upload release asset (Installer)
|
- name: Upload release asset (Installer)
|
||||||
shell: bash
|
shell: bash
|
||||||
|
working-directory: ./build/bin/
|
||||||
run: |
|
run: |
|
||||||
filepath="TinyRDM-amd64-installer.exe"
|
filepath="TinyRDM-amd64-installer.exe"
|
||||||
filename="TinyRDM_Setup_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.exe"
|
filename="TinyRDM_Setup_${{ steps.normalise_version.outputs.version }}_${{ steps.normalise_platform.outputs.tag }}.exe"
|
||||||
upload_url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets"
|
upload_url="https://uploads.github.com/repos/${GITHUB_REPOSITORY}/releases/${{ github.event.release.id }}/assets"
|
||||||
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/octet-stream" --data-binary @$filepath "$upload_url?name=$filename"
|
curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" -H "Content-Type: application/octet-stream" --data-binary @$filepath "$upload_url?name=$filename"
|
||||||
working-directory: ./build/bin/
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
Package: {{.Name}}
|
Package: {{.Name}}
|
||||||
Version: {{.Info.ProductVersion}}
|
Version: {{.Info.ProductVersion}}
|
||||||
Section: base
|
Section: base
|
||||||
|
Depends: libc6 (>= 2.34), libc6 (>= 2.32)
|
||||||
Priority: optional
|
Priority: optional
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
Maintainer: {{.Author.Name}} <{{.Author.Email}}>
|
Maintainer: {{.Author.Name}} <{{.Author.Email}}>
|
||||||
|
|
Loading…
Reference in New Issue