FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

refactor(build): standardize CI/CD · trgiangv/RevitDevTool@5e6b7fb · GitHub

Repository navigation

Commit 5e6b7fb

Browse files
committed
refactor(build): standardize CI/CD
- fix PublishDaemonModule - Fix branch ref to main in workflows (renamed from master) - Add concurrency control and auto-merge develop after publish
1 parent 431e211 commit 5e6b7fb

3 files changed

Lines changed: 25 additions & 3 deletions

File tree

‎.github/workflows/Compile.yml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,15 @@ on:
44
push:
55
branches:
66
- '*'
7+
tags-ignore:
8+
- '*'
79
pull_request:
810
workflow_dispatch:
911

12+
concurrency:
13+
group: compile-${{ github.ref }}
14+
cancel-in-progress: true
15+
1016
jobs:
1117
windows:
1218
name: windows-2025

‎.github/workflows/PublishRelease.yml‎

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,14 @@ on:
77
workflow_dispatch:
88
inputs:
99
version:
10-
description: "Release version (optional)"
10+
description: "Release version (e.g. 3.1.0, 3.1.0-beta.1)"
1111
required: false
1212
type: string
1313

14+
concurrency:
15+
group: publish-release
16+
cancel-in-progress: false
17+
1418
jobs:
1519
windows:
1620
name: windows-2025
@@ -53,5 +57,16 @@ jobs:
5357
working-directory: "build"
5458
env:
5559
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
56-
DOTNET_ENVIRONMENT: ${{ (github.ref_name == 'main' || github.ref_type == 'tag') && 'Production' || 'Development' }}
57-
Build__Version: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.version || github.ref_name }}
60+
DOTNET_ENVIRONMENT: Production
61+
Build__Version: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.version || github.ref_name }}
62+
63+
- name: Fast-forward develop to include release tag
64+
if: success()
65+
shell: bash
66+
run: |
67+
set -e
68+
TAG="${{ github.event_name == 'workflow_dispatch' && github.event.inputs.version || github.ref_name }}"
69+
git fetch origin develop
70+
git checkout develop
71+
git merge --no-edit "tags/$TAG" || true
72+
git push origin develop || echo "::warning::Could not push develop merge. Manual merge needed."

‎build/Modules/PublishDaemonModule.cs‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace Build.Modules;
1313
/// The csproj DeployDevToolsDaemon target handles kill + copy to bundle Contents.
1414
/// </summary>
1515
[DependsOn<ResolveVersioningModule>]
16+
[DependsOn<CompileProjectModule>]
1617
[DependsOn<CleanProjectModule>(Optional = true)]
1718
[UsedImplicitly]
1819
public sealed class PublishDaemonModule : Module<string>

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL