Skip to content

Commit e7e7728

Browse files
committed
merge changes from main
1 parent 7c00000 commit e7e7728

File tree

5 files changed

+44
-8
lines changed

5 files changed

+44
-8
lines changed

.github/actions/update-version/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,16 @@ runs:
7171
git add ${{ inputs.changelog-output-file }}
7272
7373
- name: update version
74-
id: result
74+
if: ${{ inputs.template-extension != '' || inputs.files != '' }}
7575
working-directory: ${{ github.workspace }}
7676
shell: bash
7777
run: |
7878
SCRIPT="${{inputs.ksp-build-tools-root}}/update-version.sh"
7979
chmod +x $SCRIPT
8080
$SCRIPT -g true -d true $VERSION_STRING ${{inputs.template-extension}} ${{inputs.files}}
81-
echo "version-string=$VERSION_STRING" >> "$GITHUB_OUTPUT"
8281
82+
- name: output
83+
id: result
84+
shell: bash
85+
run: |
86+
echo "version-string=$VERSION_STRING" >> "$GITHUB_OUTPUT"

.github/workflows/create-release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
run: |
7878
git config --global user.name "github-actions"
7979
git config --global user.email "[email protected]"
80-
git commit -m "bump version to $VERSION_STRING"
80+
git commit --allow-empty -m "bump version to $VERSION_STRING"
8181
git tag -f -a "$VERSION_STRING" -m "$VERSION_STRING"
8282
8383
# Install CKAN and set up an instance
@@ -91,6 +91,7 @@ jobs:
9191
dependency-identifiers: ${{ inputs.dependency-identifiers }}
9292

9393
- name: compile
94+
if: ${{ inputs.use-msbuild }}
9495
uses: KSPModdingLibs/KSPBuildTools/.github/actions/compile@main
9596
with:
9697
build-configuration: ${{ inputs.build-configuration }}

.github/workflows/internal-ci.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,20 @@ jobs:
6868
if: github.event_name != 'pull_request'
6969
secrets: inherit
7070

71-
deploy-nuget:
71+
deploy:
7272
runs-on: ubuntu-22.04
73-
needs: [ test-plugin, test-plugin-nuget, test-plugin-legacy, test-assetbundle ]
73+
needs: [ build, test-plugin, test-plugin-nuget, test-plugin-legacy, test-assetbundle ]
7474
environment:
7575
name: "NuGet"
7676
url: "https://www.nuget.org/packages/KSPBuildTools"
7777
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
7878
steps:
79+
- uses: actions/checkout@v4
80+
81+
- name: Get Changelog Information
82+
uses: drewcassidy/[email protected]
83+
id: yaclog-show
84+
7985
- name: Setup .NET
8086
uses: actions/setup-dotnet@v4
8187
with:
@@ -100,3 +106,12 @@ jobs:
100106
- name: Publish Package to Github
101107
run: |
102108
dotnet nuget push --source "github" ${{ env.NuGetDirectory }}/*.nupkg
109+
110+
- name: Publish to Github Releases
111+
run: >
112+
gh release create ${{ github.ref_name }}
113+
--notes-file "${{ steps.yaclog-show.outputs.body-file }}"
114+
--title "${{ needs.build.outputs.package-version }}"
115+
${{ env.NuGetDirectory }}/*.nupkg
116+
env:
117+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CHANGELOG.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
11
# Changelog
22

3-
All notable changes to this project will be documented in this file
3+
All notable changes to this project will be documented in this file
4+
5+
## 0.0.3 - 2024-12-16
6+
7+
### Actions
8+
9+
- Made `compile` step of `create-release` conditional based on the `use-msbuild` input
10+
11+
### Build
12+
13+
- Fixed directories not being copied to output (#38)
14+
- Fixed error when `GenerateKSPAssemblyAttribute` is unset
15+
16+
17+
## 0.0.2 - 2024-10-21
18+
19+
first stable release

KSPCommon.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
Generate the KSPAssembly attribute based on the FileVersion property
8787
-->
8888
<Target Name="GenerateKSPAssemblyAttribute" BeforeTargets="CoreGenerateAssemblyInfo"
89-
Condition="$(GenerateKSPAssemblyAttribute)">
89+
Condition="'$(GenerateKSPAssemblyAttribute)' == 'true'">
9090
<ItemGroup>
9191
<AssemblyAttribute Include="KSPAssembly">
9292
<_Parameter1>$(AssemblyName)</_Parameter1>
@@ -110,7 +110,7 @@
110110
Otherwise 0.0.0 is used (no minimum version)
111111
-->
112112
<Target Name="GenerateKSPAssemblyDependencyAttributes" BeforeTargets="CoreGenerateAssemblyInfo"
113-
Condition="$(GenerateKSPAssemblyDependencyAttributes) == 'true'">
113+
Condition="'$(GenerateKSPAssemblyDependencyAttributes)' == 'true'">
114114
<ItemGroup>
115115
<Reference Update="%(Reference.identity)" Condition="'%(Reference.CKANIdentifier)%(Reference.KSPAssemblyName)' != ''">
116116
<KSPAssemblyName Condition="%(Reference.KSPAssemblyName) == ''">$([System.String]::Copy('%(Reference.identity)').Split(',')[0])</KSPAssemblyName>

0 commit comments

Comments
 (0)