Skip to content

Update VERSION

Update VERSION #29

Workflow file for this run

name: Build
on:
push:
branches: [pebble-10.1]
pull_request:
workflow_dispatch:
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- name: linux-x86_64
runner: ubuntu-22.04
os: linux
- name: linux-arm64
runner: ubuntu-22.04-arm
os: linux
- name: macos-arm64
runner: macos-latest
os: macos
- name: macos-x86_64
runner: macos-latest-large
os: macos
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install dependencies (Linux)
if: matrix.os == 'linux'
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential ninja-build pkg-config python3-venv \
libsdl2-dev libpixman-1-dev libglib2.0-dev \
libpcre2-dev libffi-dev zlib1g-dev
- name: Install dependencies (macOS)
if: matrix.os == 'macos'
run: |
brew install sdl2 pixman glib pkg-config ninja
- name: Build
run: bash build-dist.sh
- name: Smoke test binary
run: |
./dist/bin/qemu-pebble --version
- name: Upload dist artifact
uses: actions/upload-artifact@v7
with:
name: qemu-pebble-${{ matrix.name }}
path: dist/
if-no-files-found: error
release:
name: Release
needs: build
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/pebble-10.1'
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Check if VERSION changed
id: version_check
env:
PUSHED_COMMITS: ${{ toJSON(github.event.commits.*.id) }}
run: |
changed=false
for sha in $(echo "$PUSHED_COMMITS" | jq -r '.[]'); do
if git show --pretty=format: --name-only "$sha" | grep -qx 'VERSION'; then
changed=true
break
fi
done
if [ "$changed" = true ]; then
VERSION=$(tr -d '[:space:]' < VERSION)
echo "changed=true" >> "$GITHUB_OUTPUT"
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
echo "VERSION bumped to $VERSION"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
echo "VERSION not changed; skipping release"
fi
- name: Download all artifacts
if: steps.version_check.outputs.changed == 'true'
uses: actions/download-artifact@v5
with:
path: artifacts
- name: Package artifacts
if: steps.version_check.outputs.changed == 'true'
run: |
mkdir -p release
cd artifacts
for dir in */; do
name="${dir%/}"
tar -czf "../release/${name}.tar.gz" -C "$dir" .
done
- name: Create release
if: steps.version_check.outputs.changed == 'true'
env:
GH_TOKEN: ${{ github.token }}
VERSION: ${{ steps.version_check.outputs.version }}
run: |
gh release create "v${VERSION}" \
--title "v${VERSION}" \
--target "${GITHUB_SHA}" \
--generate-notes \
release/*