This repository has been archived by the owner on Dec 14, 2024. It is now read-only.
Build and Release #50
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#file: noinspection SpellCheckingInspection | |
name: Build and Release | |
on: | |
release: | |
types: | |
- created | |
env: | |
node_version: 18 | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.node_version }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# - name: install maker-flatpak dependencies | |
# run: | | |
# sudo apt-get install flatpak -y | |
# sudo apt-get install flatpak-builder -y | |
# sudo apt-get install elfutils -y | |
# sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo | |
# sudo flatpak install flathub org.freedesktop.Platform/x86_64/19.08 org.freedesktop.Sdk/x86_64/19.08 org.electronjs.Electron2.BaseApp/x86_64/stable -y | |
- name: Install dependencies | |
run: | | |
yarn | |
yarn version --no-git-tag-version --new-version ${{ github.event.release.tag_name }} | |
- name: Build for Linux | |
run: yarn make --platform linux | |
- name: Rename output files | |
run: | | |
mv out/make/deb/x64/vtt-desktop-client_${{ github.event.release.tag_name }}_amd64.deb ./vtt-desktop-client_${{ github.event.release.tag_name }}_amd64.deb | |
mv out/make/rpm/x64/vtt-desktop-client-${{ github.event.release.tag_name }}-1.x86_64.rpm ./vtt-desktop-client-${{ github.event.release.tag_name }}-1.x86_64.rpm | |
mv out/make/zip/linux/x64/vtt-desktop-client-linux-x64-${{ github.event.release.tag_name }}.zip ./vtt-desktop-client-linux-x64-${{ github.event.release.tag_name }}.zip | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: linux-outputs | |
path: | | |
vtt-desktop-client_${{ github.event.release.tag_name }}_amd64.deb | |
vtt-desktop-client-${{ github.event.release.tag_name }}-1.x86_64.rpm | |
vtt-desktop-client-linux-x64-${{ github.event.release.tag_name }}.zip | |
# - name: Upload to Flathub | |
# uses: flatpak/flatpak-github-actions/flat-manager@v4 | |
# with: | |
# repository: elementary | |
# flat-manager-url: https://flatpak-api.elementary.io | |
# token: some_very_hidden_token | |
# end-of-life: "The application has been renamed to..." | |
# end-of-life-rebase: "org.zbrown.Palette" | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.node_version }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
yarn | |
yarn version --no-git-tag-version --new-version ${{ github.event.release.tag_name }} | |
- name: Build for macOS | |
run: yarn make --platform darwin | |
- name: Rename output files | |
run: | | |
mv out/make/zip/darwin/x64/vtt-desktop-client-darwin-x64-${{ github.event.release.tag_name }}.zip ./vtt-desktop-client-macos-x64-${{ github.event.release.tag_name }}.zip | |
mv out/make/vtt-desktop-client-${{ github.event.release.tag_name }}-x64.dmg ./vtt-desktop-client-${{ github.event.release.tag_name }}-x64.dmg | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: macos-outputs | |
path: | | |
vtt-desktop-client-macos-x64-${{ github.event.release.tag_name }}.zip | |
vtt-desktop-client-${{ github.event.release.tag_name }}-x64.dmg | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.node_version }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
yarn | |
yarn version --no-git-tag-version --new-version ${{ github.event.release.tag_name }} | |
- name: Build for Windows | |
run: yarn make --platform win32 | |
- name: Rename output files | |
run: | | |
Move-Item -Path "out\make\squirrel.windows\x64\vtt-desktop-client-${{ github.event.release.tag_name }} Setup.exe" -Destination ".\vtt-desktop-client-windows-x64-${{ github.event.release.tag_name }}-setup.exe" | |
Move-Item -Path "out\make\zip\win32\x64\vtt-desktop-client-win32-x64-${{ github.event.release.tag_name }}.zip" -Destination ".\vtt-desktop-client-windows-x64-portable-${{ github.event.release.tag_name }}.zip" | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: windows-outputs | |
path: | | |
vtt-desktop-client-windows-x64-${{ github.event.release.tag_name }}-setup.exe | |
vtt-desktop-client-windows-x64-portable-${{ github.event.release.tag_name }}.zip | |
publish: | |
needs: | |
- build-linux | |
- build-macos | |
- build-windows | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download linux production artifacts for publication | |
uses: actions/download-artifact@v2 | |
with: | |
name: linux-outputs | |
path: linux-outputs | |
- name: Download windows production artifacts for publication | |
uses: actions/download-artifact@v2 | |
with: | |
name: windows-outputs | |
path: windows-outputs | |
- name: Download macos production artifacts for publication | |
uses: actions/download-artifact@v2 | |
with: | |
name: macos-outputs | |
path: macos-outputs | |
- name: Create release | |
id: create_version_release | |
uses: ncipollo/release-action@v1 | |
with: | |
allowUpdates: true | |
name: ${{ github.event.release.name }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: "./linux-outputs/*, ./windows-outputs/*, ./macos-outputs/*" | |
body: ${{ github.event.release.body }} |