312 lines
8.3 KiB
YAML
312 lines
8.3 KiB
YAML
name: Create Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'VERSION'
|
|
|
|
jobs:
|
|
check-version-change:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
outputs:
|
|
version: ${{ steps.get-version.outputs.version }}
|
|
should-release: ${{ steps.check-tag.outputs.should-release }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Get version from VERSION file
|
|
id: get-version
|
|
run: |
|
|
VERSION=$(cat VERSION)
|
|
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
|
|
echo "Version: ${VERSION}"
|
|
|
|
- name: Check if tag exists
|
|
id: check-tag
|
|
run: |
|
|
VERSION="${{ steps.get-version.outputs.version }}"
|
|
git fetch --tags
|
|
if git rev-parse "v${VERSION}" >/dev/null 2>&1; then
|
|
echo "Tag v${VERSION} already exists, skipping release"
|
|
echo "should-release=false" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "Tag v${VERSION} does not exist, proceeding with release"
|
|
echo "should-release=true" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
build-libs:
|
|
needs: check-version-change
|
|
if: needs.check-version-change.outputs.should-release == 'true'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build library packages
|
|
run: |
|
|
bin/package_libs
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: release-artifacts-libs
|
|
path: out/*.tar.gz
|
|
|
|
build-gnome-x86_64:
|
|
needs: check-version-change
|
|
if: needs.check-version-change.outputs.should-release == 'true'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -y \
|
|
gnome-shell-extension-prefs \
|
|
meson \
|
|
ninja-build \
|
|
librsvg2-bin \
|
|
libglib2.0-dev \
|
|
gettext \
|
|
wget \
|
|
desktop-file-utils \
|
|
appstream
|
|
|
|
- name: Build Breezy GNOME (x86_64)
|
|
run: |
|
|
ARCH=x86_64 bin/package_gnome
|
|
env:
|
|
UA_API_SECRET: ${{ secrets.UA_API_SECRET }}
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: release-artifacts-gnome-x86_64
|
|
path: out/*.tar.gz
|
|
|
|
build-gnome-aarch64:
|
|
needs: check-version-change
|
|
if: needs.check-version-change.outputs.should-release == 'true'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -y \
|
|
gnome-shell-extension-prefs \
|
|
meson \
|
|
ninja-build \
|
|
librsvg2-bin \
|
|
libglib2.0-dev \
|
|
gettext \
|
|
wget \
|
|
desktop-file-utils \
|
|
appstream
|
|
|
|
- name: Build Breezy GNOME (aarch64)
|
|
run: |
|
|
ARCH=aarch64 bin/package_gnome
|
|
env:
|
|
UA_API_SECRET: ${{ secrets.UA_API_SECRET }}
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: release-artifacts-gnome-aarch64
|
|
path: out/*.tar.gz
|
|
|
|
build-kwin-steamos-3_7:
|
|
needs: check-version-change
|
|
if: needs.check-version-change.outputs.should-release == 'true'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build Breezy KWin (steamos-3.7)
|
|
run: |
|
|
STEAMOS=3.7 bin/package_kwin
|
|
env:
|
|
UA_API_SECRET: ${{ secrets.UA_API_SECRET }}
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: release-artifacts-kwin-steamos-3.7
|
|
path: out/*.tar.gz
|
|
|
|
build-kwin-steamos-3_8:
|
|
needs: check-version-change
|
|
if: needs.check-version-change.outputs.should-release == 'true'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build Breezy KWin (steamos-3.8)
|
|
run: |
|
|
STEAMOS=3.8 bin/package_kwin
|
|
env:
|
|
UA_API_SECRET: ${{ secrets.UA_API_SECRET }}
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: release-artifacts-kwin-steamos-3.8
|
|
path: out/*.tar.gz
|
|
|
|
build-kwin-steamos-3_9:
|
|
needs: check-version-change
|
|
if: needs.check-version-change.outputs.should-release == 'true'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build Breezy KWin (steamos-3.9)
|
|
run: |
|
|
STEAMOS=3.9 bin/package_kwin
|
|
env:
|
|
UA_API_SECRET: ${{ secrets.UA_API_SECRET }}
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: release-artifacts-kwin-steamos-3.9
|
|
path: out/*.tar.gz
|
|
|
|
build-vulkan-x86_64:
|
|
needs: check-version-change
|
|
if: needs.check-version-change.outputs.should-release == 'true'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Build Breezy Vulkan (x86_64)
|
|
run: |
|
|
ARCH=x86_64 bin/package_vulkan
|
|
env:
|
|
UA_API_SECRET: ${{ secrets.UA_API_SECRET }}
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: release-artifacts-vulkan-x86_64
|
|
path: out/*.tar.gz
|
|
|
|
create-release:
|
|
needs:
|
|
- check-version-change
|
|
- build-libs
|
|
- build-gnome-x86_64
|
|
- build-gnome-aarch64
|
|
- build-kwin-steamos-3_7
|
|
- build-kwin-steamos-3_8
|
|
- build-kwin-steamos-3_9
|
|
- build-vulkan-x86_64
|
|
if: needs.check-version-change.outputs.should-release == 'true'
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Download artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
pattern: release-artifacts-*
|
|
path: artifacts
|
|
merge-multiple: true
|
|
|
|
- name: Create Release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
VERSION="${{ needs.check-version-change.outputs.version }}"
|
|
|
|
# Verify setup scripts exist
|
|
for script in bin/breezy_gnome_setup bin/breezy_kwin_setup bin/breezy_vulkan_setup; do
|
|
if [ ! -f "$script" ]; then
|
|
echo "Error: $script not found"
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
# Create a tag
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
git tag -a "v${VERSION}" -m "Release v${VERSION}"
|
|
git push origin "v${VERSION}"
|
|
|
|
# Create release with artifacts
|
|
gh release create "v${VERSION}" \
|
|
--title "Release v${VERSION}" \
|
|
--generate-notes \
|
|
artifacts/* \
|
|
bin/breezy_gnome_setup \
|
|
bin/breezy_kwin_setup \
|
|
bin/breezy_vulkan_setup
|