Skip to content

Commit

Permalink
Merge pull request #1 from Yellow-Dog-Man/feat/ci
Browse files Browse the repository at this point in the history
feat(ci): add ci stuff
  • Loading branch information
ProbablePrime authored Nov 6, 2023
2 parents 5133113 + 7595c78 commit 6784144
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 8 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Build Library

on:
push:
paths-ignore:
- '**/*.md'
branches:
- master
pull_request:
branches:
- master
paths-ignore:
- '**/*.md'

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test with the dotnet CLI
run: dotnet test
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Publish Library

# When a release is published
on:
release:
types: [published]
jobs:
publish:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Get version
run: |
echo "VERSION=${{ github.event.release.tag_name }}" >> $env:GITHUB_ENV
echo "Building with ${{ env.VERSION }}"
- name: Setup .NET 7
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore -p:Version=${{ env.VERSION }}
- name: Test with the dotnet CLI
run: dotnet test
- name: Pack
run: dotnet pack Hardware.Info --output nupkgs --configuration Release -p:Version=${{ env.VERSION }}
- name: Nuget Publish
run: dotnet nuget push nupkgs\*.nupkg -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json
17 changes: 9 additions & 8 deletions Hardware.Info/Hardware.Info.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@
</PropertyGroup>

<PropertyGroup>
<Product>Hardware.Info</Product>
<PackageId>Hardware.Info</PackageId>
<PackageVersion>11.1.0.0</PackageVersion>
<Version>11.1.0.0</Version>
<Authors>Jinjinov</Authors>
<Description>Battery, BIOS, CPU - processor, storage drive, keyboard, RAM - memory, monitor, motherboard, mouse, NIC - network adapter, printer, sound card - audio card, graphics card - video card. Hardware.Info is a .NET Standard 2.0 library and uses WMI on Windows, /dev, /proc, /sys on Linux and sysctl, system_profiler on macOS.</Description>
<Product>YellowDogMan.Hardware.Info</Product>
<PackageId>YellowDogMan.Hardware.Info</PackageId>
<!-- we'll handle these via our workflows-->
<!--<PackageVersion>11.1.0.0-ydm</PackageVersion>
<Version>11.1.0.0</Version>-->
<Authors>Jinjinov, Yellow Dog Man Studios s.r.o</Authors>
<Description>Yellow Dog Man Studios fork of Hardware.Info. Battery, BIOS, CPU - processor, storage drive, keyboard, RAM - memory, monitor, motherboard, mouse, NIC - network adapter, printer, sound card - audio card, graphics card - video card. Hardware.Info is a .NET Standard 2.0 library and uses WMI on Windows, /dev, /proc, /sys on Linux and sysctl, system_profiler on macOS.</Description>
<Copyright>Copyright (c) Jinjinov 2022</Copyright>
<PackageProjectUrl>https://github.com/Jinjinov/Hardware.Info</PackageProjectUrl>
<PackageProjectUrl>https://github.com/Yellow-Dog-Man/Hardware.Info</PackageProjectUrl>
<!--<PackageIcon></PackageIcon>-->
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/Jinjinov/Hardware.Info.git</RepositoryUrl>
<RepositoryUrl>https://github.com/Yellow-Dog-Man/Hardware.Info.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageTags>Computer;Device;Hardware;Info;Information;NET Standard;Windows;Linux;macOS</PackageTags>
<!--<PackageReleaseNotes></PackageReleaseNotes>-->
Expand Down

0 comments on commit 6784144

Please sign in to comment.