Testing build action
This commit is contained in:
parent
bc1f0fb943
commit
bb3d75521e
24
.gitea/workflows/build.yml
Normal file
24
.gitea/workflows/build.yml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
name: Build MycroForge.CLI
|
||||||
|
run-name: ${{ gitea.actor }} triggered a build for the MycroForge.CLI
|
||||||
|
on: [ push ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
# if: gitea.ref == 'refs/heads/main'
|
||||||
|
steps:
|
||||||
|
- uses: https://github.com/actions/checkout@v4
|
||||||
|
- uses: https://github.com/actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: '8.x'
|
||||||
|
- name: "Build MycroForge.CLI as a NuGet package"
|
||||||
|
run: dotnet pack -v d
|
||||||
|
- name: "Add package source"
|
||||||
|
run: |
|
||||||
|
dotnet nuget add source --name devdisciples \
|
||||||
|
--username ${{secrets.NUGET_USER}} \
|
||||||
|
--password ${{ NUGET_PASS }} \
|
||||||
|
--store-password-in-clear-text \
|
||||||
|
https://git.devdisciples.com/api/packages/devdisciples/nuget/index.json
|
||||||
|
- name: "Run MycroForge.CLI.Tests"
|
||||||
|
run: dotnet nuget push nupkg/MycroForge.CLI.1.0.1.nupkg --source devdisciples
|
@ -1,21 +0,0 @@
|
|||||||
name: Test and build
|
|
||||||
run-name: ${{ gitea.actor }} is building MycroForge.CLI
|
|
||||||
on: [ push ]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: https://github.com/actions/checkout@v4
|
|
||||||
- uses: https://github.com/actions/setup-dotnet@v4
|
|
||||||
with:
|
|
||||||
dotnet-version: '8.x'
|
|
||||||
# - name: "Run dotnet restore"
|
|
||||||
# run: dotnet restore
|
|
||||||
# - name: "Run dotnet build"
|
|
||||||
# run: dotnet build --no-restore
|
|
||||||
- name: "Reference MycroForge.Core in MycroForge.PluginTemplate"
|
|
||||||
run: dotnet add MycroForge.PluginTemplate reference MycroForge.Core
|
|
||||||
- name: "Run MycroForge.CLI.Tests"
|
|
||||||
# run: dotnet test --no-build --verbosity normal
|
|
||||||
run: dotnet test
|
|
20
.gitea/workflows/test.yml
Normal file
20
.gitea/workflows/test.yml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
name: Test MycroForge.CLI
|
||||||
|
run-name: ${{ gitea.actor }} triggered a test for the MycroForge.CLI
|
||||||
|
on: [ push ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: gitea.ref == 'refs/heads/main'
|
||||||
|
steps:
|
||||||
|
- uses: https://github.com/actions/checkout@v4
|
||||||
|
- uses: https://github.com/actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: '8.x'
|
||||||
|
- name: "Reference MycroForge.Core in MycroForge.PluginTemplate"
|
||||||
|
# The MycroForge.PluginTemplate project references MycroForge.Core as a package and not as a reference.
|
||||||
|
# This allows the 'm4g plugin init' command to pull in the core package from a package repository.
|
||||||
|
# To prevent the test command from trying to pull from the package repository, we reference the local project.
|
||||||
|
run: dotnet add MycroForge.PluginTemplate reference MycroForge.Core
|
||||||
|
- name: "Run MycroForge.CLI.Tests"
|
||||||
|
run: dotnet test
|
Loading…
Reference in New Issue
Block a user