Skip to content

implement custom AppUserModelID and property store wrapper #446

implement custom AppUserModelID and property store wrapper

implement custom AppUserModelID and property store wrapper #446

Workflow file for this run

name: Build
on:
push:
paths-ignore:
- ".clang-format"
- ".gitignore"
- "*.md"
- "LICENSE"
- "setdll/**"
- "src/version.h"
- ".github/ISSUE_TEMPLATE/**"
- ".github/workflows/delete_old_workflow_runs.yml"
- ".github/workflows/genReleaseNote.sh"
workflow_dispatch:
inputs:
version:
description: 'Release version (SemVer)'
required: true
jobs:
build:
strategy:
matrix:
include:
- name: build_x86
arch: x86
- name: build_x64
arch: x64
- name: build_arm64
arch: arm64
name: ${{ matrix.name }}
runs-on: windows-2025
steps:
- name: Checkout Repo
uses: actions/checkout@v6
with:
submodules: 'true'
- name: Update version.h
shell: bash
run: |
if [ "${{ github.event_name }}" == "push" ]; then
COMMIT_HASH=$(git rev-parse --short HEAD)
VERSION="alpha-${COMMIT_HASH}"
echo "VERSION=$VERSION" >> $GITHUB_ENV
sed -i '/#define RELEASE_VER_STR/,/TOSTRING(RELEASE_VER_FIX)/c\#define RELEASE_VER_STR "'"$VERSION"'"' src/version.h
elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
VERSION="${{ github.event.inputs.version }}"
echo "VERSION=$VERSION" >> $GITHUB_ENV
IFS='.' read -r MAJOR MINOR PATCH <<< "$VERSION"
sed -i 's/#define RELEASE_VER_MAIN .*/#define RELEASE_VER_MAIN '"$MAJOR"'/' src/version.h
sed -i 's/#define RELEASE_VER_SUB .*/#define RELEASE_VER_SUB '"$MINOR"'/' src/version.h
sed -i 's/#define RELEASE_VER_FIX .*/#define RELEASE_VER_FIX '"$PATCH"'/' src/version.h
fi
- name: Set CLANG_BIN
shell: bash
run: |
CLANG_BIN=$(dirname "$(where clang-cl | head -n 1)")
echo "CLANG_BIN=$CLANG_BIN" >> $GITHUB_ENV
- name: Setup Xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: '3.0.5'
- name: Configure Xmake
run: xmake f -a ${{ matrix.arch }} --toolchain=clang-cl --bin="${{ env.CLANG_BIN }}" --yes
- name: Build Chrome++
run: xmake
- name: Upload Build Artifacts
uses: actions/upload-artifact@v6
with:
name: version-${{ matrix.arch }}-${{ env.VERSION }}
path: build/release/*
create_pr:
needs: build
runs-on: ubuntu-slim
if: github.event_name == 'workflow_dispatch'
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Git Configurations
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout -b release
- name: Update version.h
run: |
VERSION="${{ github.event.inputs.version }}"
echo "VERSION=$VERSION" >> $GITHUB_ENV
IFS='.' read -r MAJOR MINOR PATCH <<< "$VERSION"
sed -i 's/#define RELEASE_VER_MAIN .*/#define RELEASE_VER_MAIN '"$MAJOR"'/' src/version.h
sed -i 's/#define RELEASE_VER_SUB .*/#define RELEASE_VER_SUB '"$MINOR"'/' src/version.h
sed -i 's/#define RELEASE_VER_FIX .*/#define RELEASE_VER_FIX '"$PATCH"'/' src/version.h
git add src/version.h
git commit -m "build(release): bump version to $VERSION"
git push origin release --force
- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
run: |
gh pr create --base main --head release --title "build(release): bump version to ${{ github.event.inputs.version }}" --body "Bump version to ${{ github.event.inputs.version }}"
- name: Output Run ID
run: echo "RUN_ID=${{ github.run_id }}" >> $GITHUB_OUTPUT