Skip to content

Commit

Permalink
Yak build version check
Browse files Browse the repository at this point in the history
  • Loading branch information
goswinr committed Dec 15, 2024
1 parent 2cf251c commit 7051c6e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 7 deletions.
21 changes: 15 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,36 @@ jobs:
- name: Build
run: dotnet build --configuration Release

- name: Check version consistency of git tag and CHANGELOG.md
# needs in fsproj:
# <Target Name="WriteChangelogVersion" AfterTargets="AfterBuild">
# <WriteLinesToFile File="bin/ChangelogVersion.txt" Lines="@(CurrentReleaseChangelog)" Overwrite="true" ContinueOnError="false" />
# </Target>
id: check_version
run: |
CHANGELOG_VERSION=$(cat bin/ChangelogVersion.txt | tr -d '[:space:]')
if [ "${{ github.ref_name }}" != "$CHANGELOG_VERSION" ]; then
echo "Version mismatch: git tag (${{ github.ref_name }}) and version in CHANGELOG.md ($CHANGELOG_VERSION) are not the same."
exit 1
fi
# https://discourse.mcneel.com/t/github-action-to-yak/120815/3

- name: Download Yak
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: curl -o yak.exe http://files.mcneel.com/yak/tools/latest/yak.exe
run: curl -o bin\yak.exe http://files.mcneel.com/yak/tools/latest/yak.exe

- name: Build Yak
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
run: ..\..\yak.exe build --platform win --version ${{ github.ref_name }}
run: ..\yak.exe build --platform win --version ${{ github.ref_name }}
# I prepopulated a manifest file and copied it next to the .gha
working-directory: bin/Release


- name: Push new version to YAK
run: |
$YAK_FILE=$(ls *.yak)
echo $YAK_FILE
..\..\yak.exe push $YAK_FILE
run: ..\yak.exe push *.yak
working-directory: bin/Release
# You should create a secret using the token from here: yak.exe login --ci
env:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.16.2] - 2024-12-15
### Added
- Yak build version check

## [0.16.1] - 2024-12-14
### Changed
- Updated to Fesh 0.16.0
Expand Down
5 changes: 5 additions & 0 deletions Fesh.Rhino.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,12 @@
<Compile Include="Src/Commands.fs" />
</ItemGroup>



<Target Name="CopyFilesOverAfterBuild" BeforeTargets="AfterBuild">

<WriteLinesToFile File="bin/ChangelogVersion.txt" Lines="@(CurrentReleaseChangelog)" Overwrite="true" ContinueOnError="false" />

<!-- <Copy SourceFiles="../Fesh/Src/SyntaxHighlightingFSharp.xshd" DestinationFiles="$(TargetDir)SyntaxHighlightingFSharp.xshd" ContinueOnError="false" /> -->

<!-- take latest SyntaxHighlightingFSharp.xshd from https://github.com/goswinr/Fesh nuget.-->
Expand Down
2 changes: 1 addition & 1 deletion Src/yak.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Fesh
version: 0.16.0
version: 0.0.0
url: "https://github.com/goswinr/Fesh.Rhino"
icon: logo.png
authors:
Expand Down

0 comments on commit 7051c6e

Please sign in to comment.