Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
asd
  • Loading branch information
stamepicmorg committed Sep 29, 2024
1 parent 1c8ce21 commit d5cfe76
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 21 deletions.
52 changes: 40 additions & 12 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and Deploy

on:
push:
branches: [ master ]
branches: [ master, develop ]
pull_request:
branches: [ master ]

Expand All @@ -16,7 +16,8 @@ jobs:

strategy:
matrix:
configuration: [Debug, Release]
# configuration: [Debug, Release]
configuration: [Debug]

steps:
- name: Checkout code
Expand All @@ -30,21 +31,48 @@ jobs:
- name: Restore dependencies
run: dotnet restore

- name: Patch csproj version
- name: Check current directory and files
run: |
echo "Current Directory: $(pwd)"
echo "Files in current directory:"
ls -Recurse
shell: pwsh

- name: Update version
id: update_version
run: |
$csproj_files = Get-ChildItem -Path '**/*.csproj'
foreach ($file in $csproj_files) {
(Get-Content $file.FullName) -replace '<Version>.*</Version>', "<Version>${{ github.run_number }}</Version>" | Set-Content $file.FullName
}
$version_file = "src/kasthack.binding.wf.csproj"
$current_version = (Select-String -Path $version_file -Pattern '<Version>(.*?)</Version>' | ForEach-Object { $_.Matches.Groups[1].Value })
$build_number = ${GITHUB_RUN_NUMBER}
$new_version = "${current_version.Split('.')[0..1] -join '.'}.${build_number}"
(Get-Content $version_file) -replace '<Version>.*</Version>', "<Version>$new_version</Version>" | Set-Content $version_file
(Get-Content $version_file) -replace '<AssemblyVersion>.*</AssemblyVersion>', "<AssemblyVersion>${new_version}.0</AssemblyVersion>" | Set-Content $version_file
echo "new_version=$new_version" >> $GITHUB_ENV
shell: pwsh

- name: Build
run: dotnet build --configuration ${{ matrix.configuration }} --verbosity minimal

- name: Publish NuGet package
if: matrix.configuration == 'Release'
run: dotnet pack --configuration Release --output ./nupkg

- name: Push NuGet package
# - name: Publish NuGet package
# if: matrix.configuration == 'Release'
# run: dotnet pack --configuration Release --output ./nupkg

# - name: Push NuGet package
# if: matrix.configuration == 'Release'
# run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json

- name: Create GitHub Release
if: matrix.configuration == 'Release'
run: dotnet nuget push ./nupkg/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ env.new_version }}
name: ${{ env.new_version }}
files: ./nupkg/*.nupkg
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 18 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
# kasthack.binding.wf

[![Nuget](https://img.shields.io/nuget/v/kasthack.binding.wf.svg)](https://www.nuget.org/packages/kasthack.binding.wf/)
[![NuGet](https://img.shields.io/nuget/dt/kasthack.binding.wf.svg)](https://www.nuget.org/packages/kasthack.binding.wf/)
[![Build status](https://img.shields.io/appveyor/ci/kasthack/kasthack-binding-wf.svg)](https://ci.appveyor.com/project/kasthack/kasthack-binding-wf)
[![license](https://img.shields.io/github/license/kasthack/kasthack.binding.wf.svg)](LICENSE)
[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/kasthack_binding_wf)
[![NuGet Version](https://img.shields.io/nuget/v/kasthack.binding.wf?style=flat-square&link=https%3A%2F%2Fwww.nuget.org%2Fpackages%2Fkasthack.binding.wf)](https://www.nuget.org/packages/kasthack.binding.wf/)
[![NuGet Downloads](https://img.shields.io/nuget/dt/kasthack.binding.wf?style=flat-square&link=https%3A%2F%2Fwww.nuget.org%2Fpackages%2Fkasthack.binding.wf)](https://www.nuget.org/packages/kasthack.binding.wf/)
[![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/kasthack-labs/kasthack.binding.wf/build-and-deploy.yml?style=flat-square&link=https%3A%2F%2Fgithub.com%2Fkasthack-labs%2Fkasthack.binding.wf%2Factions%2Fworkflows%2Fbuild-and-deploy.yml)](https://github.com/kasthack-labs/kasthack.binding.wf/actions/workflows/build-and-deploy.yml)
[![GitHub License](https://img.shields.io/github/license/kasthack-labs/kasthack.binding.wf?style=flat-square&link=LICENSE.md)](LICENSE.md)
[![GitHub repo size](https://img.shields.io/github/repo-size/kasthack-labs/kasthack.binding.wf?style=flat-square&link=https%3A%2F%2Fgithub.com%2Fkasthack-labs%2F)](https://github.com/kasthack-labs/)
[![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/kasthack-labs/kasthack.binding.wf/total?style=flat-square&link=https%3A%2F%2Fgithub.com%2Fkasthack-labs%2Fkasthack.binding.wf%2Freleases)](https://github.com/kasthack-labs/releases)

## What
## About

Windows.Forms data binding lambda helper. Gets rid of that literal / nameof bullshit in your code.
Windows.Forms data binding lambda helper. Gets rid of that literal / nameof in your code.

## Installation

### CLI

`Install-Package kasthack.binding.wf`

### dotNet 5+

`dotnet add package kasthack.binding.wf`

### Direct in project via PackageReference

`<PackageReference Include="kasthack.binding.wf" Version="1.2.26" />`

## Usage

`control.Bind(a=>a.ControlProperty, model, a=>a.ModelProperty.ModelSubProperty)`
Expand Down
4 changes: 2 additions & 2 deletions src/kasthack.binding.wf.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
<PackageLicenseUrl>https://github.com/kasthack/kasthack.binding.wf/blob/master/LICENSE.md</PackageLicenseUrl>
<PackageProjectUrl>http://github.com/kasthack/kasthack.binding.wf</PackageProjectUrl>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>1.2.2</Version>
<AssemblyVersion>1.2.2.0</AssemblyVersion>
<Version>1.3.0</Version>
<AssemblyVersion>1.3.0.0</AssemblyVersion>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit d5cfe76

Please sign in to comment.