no message
This commit is contained in:
parent
2009ed6ec9
commit
c40ea173fa
1 changed files with 5 additions and 23 deletions
24
.github/workflows/build-release.yaml
vendored
24
.github/workflows/build-release.yaml
vendored
|
|
@ -6,31 +6,12 @@ on:
|
||||||
- v*
|
- v*
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
|
contents: write
|
||||||
packages: write
|
packages: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
|
||||||
name: Build and Test
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Set up .NET
|
|
||||||
uses: actions/setup-dotnet@v3
|
|
||||||
with:
|
|
||||||
dotnet-version: '9'
|
|
||||||
|
|
||||||
- name: Test Backend
|
|
||||||
working-directory: server
|
|
||||||
run: dotnet test
|
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Create GitHub release
|
name: Create GitHub release
|
||||||
needs: [test]
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -61,12 +42,13 @@ jobs:
|
||||||
npm ci
|
npm ci
|
||||||
npm run build
|
npm run build
|
||||||
|
|
||||||
- name: Build and Publish Backend
|
- name: Build, Test and Publish Backend
|
||||||
working-directory: server
|
working-directory: server
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: |
|
run: |
|
||||||
$v = "${{ github.ref_name }}".TrimStart('v')
|
$v = "${{ github.ref_name }}".TrimStart('v')
|
||||||
dotnet restore
|
dotnet restore
|
||||||
|
dotnet test
|
||||||
dotnet build -c Release --no-restore -p:Version=$v -p:AssemblyVersion=$v
|
dotnet build -c Release --no-restore -p:Version=$v -p:AssemblyVersion=$v
|
||||||
dotnet publish RdtClient.Web/RdtClient.Web.csproj -c Release --no-build -p:Version=$v -p:AssemblyVersion=$v -o ../publish
|
dotnet publish RdtClient.Web/RdtClient.Web.csproj -c Release --no-build -p:Version=$v -p:AssemblyVersion=$v -o ../publish
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue