Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
stamepicmorg committed Sep 29, 2024
1 parent 1c8ce21 commit 74869a6
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 17 deletions.
35 changes: 27 additions & 8 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 Down Expand Up @@ -30,21 +30,40 @@ jobs:
- name: Restore dependencies
run: dotnet restore

- name: Patch csproj version
- name: Patch csproj version and assembly version
run: |
$csproj_files = Get-ChildItem -Path '**/*.csproj'
$version = (Get-Content $csproj_files[0].FullName) -match '<Version>(\d+)\.(\d+)\.(\d+)</Version>' | Out-Null
$major = $matches[1]
$minor = $matches[2]
$patch = [int]$matches[3] + 1
$new_version = "$major.$minor.$patch"
foreach ($file in $csproj_files) {
(Get-Content $file.FullName) -replace '<Version>.*</Version>', "<Version>${{ github.run_number }}</Version>" | Set-Content $file.FullName
(Get-Content $file.FullName) `
-replace '<Version>.*</Version>', "<Version>$new_version</Version>" `
-replace '<AssemblyVersion>.*</AssemblyVersion>', "<AssemblyVersion>$new_version.0</AssemblyVersion>" `
| Set-Content $file.FullName
}
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: Publish NuGet package
# if: matrix.configuration == 'Release'
# run: dotnet pack --configuration Release --output ./nupkg

- name: Push NuGet package
# - 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: $new_version
name: $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 74869a6

Please sign in to comment.