Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: build-windows-x64
path: dist/*
path: dist/synodic

build-linux:
if: github.repository_owner == 'synodic'
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: build-linux-x64
path: dist/*
path: dist/synodic

build-macos:
if: github.repository_owner == 'synodic'
Expand All @@ -85,4 +85,4 @@ jobs:
uses: actions/upload-artifact@v4
with:
name: build-macos-x64
path: dist/*
path: dist/synodic
83 changes: 42 additions & 41 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,31 @@ on:
outputs:
artifact-name:
description: "Name of the uploaded release artifact"
value: ${{ jobs.package.outputs.artifact-name }}
value: ${{ jobs.collect-releases.outputs.artifact-name }}

env:
VELOPACK_APP_ID: synodic
VELOPACK_APP_TITLE: Synodic Client
VELOPACK_TARGETS: |
build-windows-x64:synodic.exe
build-linux-x64:synodic
build-macos-x64:synodic

jobs:
package:
runs-on: ubuntu-latest
outputs:
artifact-name: velopack-releases
strategy:
fail-fast: true
matrix:
include:
- artifact: build-windows-x64
main_exe: synodic.exe
- artifact: build-linux-x64
main_exe: synodic
- artifact: build-macos-x64
main_exe: synodic
steps:
- name: Download all build artifacts
- name: Download build artifact
uses: actions/download-artifact@v4
with:
path: builds
name: ${{ matrix.artifact }}
path: pack

- name: Install Velopack CLI
run: dotnet tool install -g vpk
Expand All @@ -50,46 +55,42 @@ jobs:
--token ${{ secrets.GITHUB_TOKEN }}

- name: Install libfuse2 for AppImage
if: contains(matrix.artifact, 'linux')
run: |
sudo apt-get update
sudo apt-get install -y libfuse2

- name: Create Velopack packages
shell: bash
- name: Create Velopack package
run: |
set -euo pipefail

mkdir -p releases
package_count=0

while IFS=':' read -r artifact_dir main_exe; do
[ -n "${artifact_dir}" ] || continue

pack_dir="builds/${artifact_dir}"

if [ ! -d "${pack_dir}" ]; then
continue
fi

vpk pack \
--packId ${{ env.VELOPACK_APP_ID }} \
--packVersion ${{ inputs.version }} \
--packDir "${pack_dir}" \
--mainExe "${main_exe}" \
--packTitle "${{ env.VELOPACK_APP_TITLE }}" \
--channel ${{ inputs.channel }} \
--outputDir releases
package_count=$((package_count + 1))
done <<< "${{ env.VELOPACK_TARGETS }}"
vpk pack \
--packId ${{ env.VELOPACK_APP_ID }} \
--packVersion ${{ inputs.version }} \
--packDir pack \
--mainExe ${{ matrix.main_exe }} \
--packTitle "${{ env.VELOPACK_APP_TITLE }}" \
--channel ${{ inputs.channel }} \
--outputDir releases

if [ "${package_count}" -eq 0 ]; then
echo "No build artifacts found to package." >&2
exit 1
fi
- name: Upload release artifacts
uses: actions/upload-artifact@v4
with:
name: velopack-release-${{ matrix.artifact }}
path: releases/*

ls -la releases/
collect-releases:
needs: package
runs-on: ubuntu-latest
outputs:
artifact-name: velopack-releases
steps:
- name: Download all release artifacts
uses: actions/download-artifact@v4
with:
pattern: velopack-release-*
path: releases
merge-multiple: true

- name: Upload release artifacts
- name: Upload combined release artifacts
uses: actions/upload-artifact@v4
with:
name: velopack-releases
Expand Down
26 changes: 10 additions & 16 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,31 +54,25 @@ jobs:
if [ "${{ github.event_name }}" == "workflow_run" ]; then
base_version="${{ steps.semver.outputs.version }}"
increment="${{ steps.semver.outputs.increment }}"
version="${base_version}.dev${increment}"
installer_version="${base_version}-dev.${increment}"
channel="dev"
tag="dev"
is_dev="true"
echo "version=${base_version}.dev${increment}" >> $GITHUB_OUTPUT
echo "installer-version=${base_version}-dev.${increment}" >> $GITHUB_OUTPUT
echo "channel=dev" >> $GITHUB_OUTPUT
echo "tag=dev" >> $GITHUB_OUTPUT
echo "is-dev=true" >> $GITHUB_OUTPUT
else
if [ "${{ github.event_name }}" == "release" ]; then
version_input="${{ github.event.release.tag_name }}"
else
version_input="${{ inputs.version }}"
fi

version="${version_input#v}"
installer_version="${version}"
channel="stable"
tag="v${version}"
is_dev="false"
echo "version=${version}" >> $GITHUB_OUTPUT
echo "installer-version=${version}" >> $GITHUB_OUTPUT
echo "channel=stable" >> $GITHUB_OUTPUT
echo "tag=v${version}" >> $GITHUB_OUTPUT
echo "is-dev=false" >> $GITHUB_OUTPUT
fi

echo "version=${version}" >> $GITHUB_OUTPUT
echo "installer-version=${installer_version}" >> $GITHUB_OUTPUT
echo "channel=${channel}" >> $GITHUB_OUTPUT
echo "tag=${tag}" >> $GITHUB_OUTPUT
echo "is-dev=${is_dev}" >> $GITHUB_OUTPUT

build:
needs: get-version
uses: ./.github/workflows/build.yml
Expand Down