Skip to content

Commit

Permalink
start unified build
Browse files Browse the repository at this point in the history
  • Loading branch information
aloneguid committed Nov 6, 2024
1 parent 3d8fad4 commit a151c7b
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 60 deletions.
56 changes: 0 additions & 56 deletions .github/workflows/build.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/lib.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: build

env:
VERSION: 2.0.2
ASM_VERSION: 2.0.0
VERSION_SUFFIX: '-pre.4'
# VERSION_SUFFIX: ''

on:
push:
branches:
- master
paths-ignore:
- docs/*

pull_request:
branches:
- master

workflow_dispatch:

jobs:

test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
6.0.x
8.0.x
- name: run tests
run: dotnet test src/Stowage.sln -c release --filter Category!=Integration


build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Check-out source code
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
6.0.x
8.0.x
- name: Build
run: dotnet build src/Stowage.sln --configuration Release /p:Version=${{ env.VERSION }}${{ env.VERSION_SUFFIX }} /p:FileVersion=${{ env.VERSION }} /p:AssemblyVersion=${{ env.ASM_VERSION }}

- name: collect artifacts
run: |
mkdir -p artifacts
cp src/Stowage/bin/Release/*.nupkg artifacts/
echo "${{ env.VERSION }}" >> artifacts/version.txt
cp docs/release-history.md artifacts/
grep -m 2 -B 1000 '^## ' artifacts/release-history.md | tail -n +3 | head -n -2 > artifacts/release-notes.md
cat artifacts/release-notes.md
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: bin
path: artifacts/*


Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: release
name: lib

on:
workflow_dispatch:
Expand Down
4 changes: 2 additions & 2 deletions src/Stowage.sln
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
ProjectSection(SolutionItems) = preProject
..\.editorconfig = ..\.editorconfig
..\.gitignore = ..\.gitignore
..\.github\workflows\build.yml = ..\.github\workflows\build.yml
..\.github\workflows\prerelease.yml = ..\.github\workflows\prerelease.yml
..\.github\workflows\lib.yml = ..\.github\workflows\lib.yml
..\.github\workflows\lib1.yml = ..\.github\workflows\lib1.yml
..\docs\README.md = ..\docs\README.md
..\docs\README.v1.md = ..\docs\README.v1.md
..\docs\release-history.md = ..\docs\release-history.md
..\.github\workflows\release.yml = ..\.github\workflows\release.yml
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Stowage", "Stowage\Stowage.csproj", "{5DA26809-911E-41B8-833B-22B70B697E89}"
Expand Down
2 changes: 1 addition & 1 deletion src/Stowage/Stowage.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net5.0;net6.0;net8.0</TargetFrameworks>
<TargetFrameworks>net6.0;net8.0</TargetFrameworks>
<Authors>Ivan Gavryliuk (@aloneguid)</Authors>
<RepositoryType>GitHub</RepositoryType>
<NeutralLanguage />
Expand Down

0 comments on commit a151c7b

Please sign in to comment.