Skip to content

Commit

Permalink
Source release
Browse files Browse the repository at this point in the history
  • Loading branch information
KaddaOK committed Feb 4, 2024
1 parent 74beba6 commit 2619a96
Show file tree
Hide file tree
Showing 136 changed files with 20,740 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and test

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Set version number
shell: pwsh
run: |
$version = "0.0.$(Get-Date -Format "yyMM.dd")$(($Env:GITHUB_RUN_NUMBER % 100).ToString("00"))"
echo $version
echo "VERSION_NUMBER=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore -property:Version=${{ env.VERSION_NUMBER }}
- name: Build
run: dotnet build --no-restore -property:Version=${{ env.VERSION_NUMBER }}
- name: Test
run: dotnet test --no-build --verbosity normal --logger trx
- name: Report Tests
uses: dorny/test-reporter@v1.8.0
with:
reporter: dotnet-trx
path: "${{ github.workspace }}/**/*.trx"
name: Unit Tests
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish Release

on:
push:
branches: ["release"]

jobs:
build:
runs-on: windows-latest

steps:
- name: Set version number
shell: pwsh
run: |
$version = "0.0.7"
echo $version
echo "VERSION_NUMBER=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Publish for win-x64
run: dotnet publish KaddaOK.AvaloniaApp.Windows/KaddaOK.AvaloniaApp.Windows.csproj /p:Version=${{ env.VERSION_NUMBER }}.0 /p:Configuration=Release /p:RuntimeIdentifier=win-x64 /p:PublishSingleFile=true /p:PublishDir=${{ github.workspace }}/publish
- name: Zip for win-x64
shell: pwsh
run: Compress-Archive -Path ${{ github.workspace }}/publish/* -DestinationPath KaddaOKTools_win-x64_${{ env.VERSION_NUMBER }}.zip
- name: Upload win-x64 Artifact
uses: actions/upload-artifact@v4
with:
name: KaddaOKTools_win-x64_${{ env.VERSION_NUMBER }}
path: KaddaOKTools_win-x64_${{ env.VERSION_NUMBER }}.zip
- name: Create Release
uses: ncipollo/release-action@v1.13.0
with:
artifacts: "KaddaOKTools_win-x64_${{ env.VERSION_NUMBER }}.zip"
tag: ${{ env.VERSION_NUMBER }}
Loading

0 comments on commit 2619a96

Please sign in to comment.