Skip to content

Commit 9f2c525

Browse files
author
Xeek
authored
fix: release please clean-up and failure on premature publishing (#39)
* fix: correct bug in release please workflow prematurely running publish job * chore: some clean-up and improvements for release-please.yml * chore: add github action support to dependabot for this repo
1 parent a94a0fc commit 9f2c525

File tree

2 files changed

+27
-20
lines changed

2 files changed

+27
-20
lines changed

.github/dependabot.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,15 @@
55

66
version: 2
77
updates:
8-
- package-ecosystem: "nuget" # See documentation for possible values
9-
directory: "/" # Location of package manifests
8+
# # Dependabot had regression where it stopped working for nuget packages in
9+
# # C++ projects.
10+
# # See https://github.com/dependabot/dependabot-core/issues/9711
11+
# - package-ecosystem: "nuget" # See documentation for possible values
12+
# directory: "/" # Location of package manifests
13+
# schedule:
14+
# interval: "weekly"
15+
16+
- package-ecosystem: "github-actions"
17+
directory: "/"
1018
schedule:
1119
interval: "weekly"

.github/workflows/release-please.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,18 @@ permissions:
1212

1313
env:
1414
APP_NAME: WindowTool
15-
VER_FILE: ./source/version.h
15+
16+
# Only one run per branch may execute at a time, and if a newer run starts we’ll
17+
# cancel the older one
18+
concurrency:
19+
group: release-${{ github.ref }}
20+
cancel-in-progress: true
1621

1722
jobs:
1823
release:
1924
runs-on: ubuntu-latest
2025
outputs:
21-
releases_created: ${{ steps.release.outputs.releases_created }}
26+
release_created: ${{ steps.release.outputs.release_created }}
2227
tag_name: ${{ steps.release.outputs.tag_name }}
2328
steps:
2429
- name: Checkout
@@ -30,34 +35,28 @@ jobs:
3035
with:
3136
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
3237

33-
build-x64:
34-
name: Build x64 Release
38+
build:
3539
needs: release
36-
if: ${{ needs.release.outputs.releases_created }}
40+
if: ${{ needs.release.outputs.release_created }}
41+
strategy:
42+
matrix:
43+
platform: [x64, x86]
3744
uses: ./.github/workflows/build.yml
38-
secrets: inherit
3945
with:
40-
platform: x64
46+
platform: ${{ matrix.platform }}
4147
configuration: Release
42-
43-
build-x86:
44-
name: Build x86 Release
45-
needs: release
46-
if: ${{ needs.release.outputs.releases_created }}
47-
uses: ./.github/workflows/build.yml
4848
secrets: inherit
49-
with:
50-
platform: x86
51-
configuration: Release
5249

5350
publish:
5451
name: Publish Release
5552
runs-on: ubuntu-latest
56-
needs: [release,build-x64,build-x86]
57-
if: ${{ needs.release.outputs.releases_created }}
53+
needs: [release,build]
54+
if: ${{ needs.release.outputs.release_created }}
5855
steps:
5956
- name: Checkout code
6057
uses: actions/checkout@v4
58+
with:
59+
ref: ${{ needs.release.outputs.tag_name }}
6160

6261
- name: Download Artifacts
6362
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)