diff --git a/.github/workflows/bump-version.yaml b/.github/workflows/bump-version.yaml
index 315e41b..306f497 100644
--- a/.github/workflows/bump-version.yaml
+++ b/.github/workflows/bump-version.yaml
@@ -1,3 +1,5 @@
+# DEPRECATED: Please use / rely on the changelog workflow as that works with protected branches
+
on:
workflow_call:
inputs:
@@ -36,11 +38,6 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v2.4.0
- - name: Setup YQ
- uses: chrisdickinson/setup-yq@v1.0.1
- with:
- yq-version: v4.16.2
-
- name: Read current version
run: |-
echo "CURRENT_VERSION=$(yq eval '.version' build.yaml)"
diff --git a/.github/workflows/changelog.yaml b/.github/workflows/changelog.yaml
index 253a422..a813e17 100644
--- a/.github/workflows/changelog.yaml
+++ b/.github/workflows/changelog.yaml
@@ -26,16 +26,11 @@ jobs:
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- name: Update Draft
- uses: release-drafter/release-drafter@v5.16.1
+ uses: release-drafter/release-drafter@v5.19.0
id: draft
env:
GITHUB_TOKEN: ${{ secrets.token }}
- - name: Setup YQ
- uses: chrisdickinson/setup-yq@v1.0.1
- with:
- yq-version: v4.16.2
-
- name: Set-up Environment
run: |-
TAG="${{ steps.draft.outputs.tag_name }}"
@@ -59,7 +54,16 @@ jobs:
- name: Update build.yaml
if: ${{ env.HAS_CHANGES == 'true' }}
run: |-
- yq eval '.targetAbi = env(ABI_VERSION) | .changelog = strenv(CHANGELOG) | .changelog style="literal"' -i build.yaml
+ if [[ -f Directory.Build.props ]]; then
+ # https://stackoverflow.com/a/57510475
+ # https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2022
+ sed -i Directory.Build.props \
+ -e "s;.*;${VERSION}.0.0.0;" \
+ -e "s;.*;${VERSION}.0.0.0;" \
+ -e "s;.*;${VERSION}.0.0.0;"
+ fi
+
+ yq eval '.version = env(VERSION) | .targetAbi = env(ABI_VERSION) | .changelog = strenv(CHANGELOG) | .changelog style="literal"' -i build.yaml
- name: Commit Changes
if: ${{ env.HAS_CHANGES == 'true' }}