mirror of
https://github.com/Ellpeck/DynamicEnums.git
synced 2024-11-22 08:43:29 +01:00
use github actions
This commit is contained in:
parent
88c75a2464
commit
9330354a2a
2 changed files with 22 additions and 20 deletions
22
.github/workflows/main.yml
vendored
Normal file
22
.github/workflows/main.yml
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
build-publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Setup .NET
|
||||||
|
uses: actions/setup-dotnet@v3
|
||||||
|
with:
|
||||||
|
dotnet-version: '8.0.x'
|
||||||
|
- name: Build
|
||||||
|
run: dotnet build
|
||||||
|
- name: Test
|
||||||
|
run: dotnet test --collect:"XPlat Code Coverage"
|
||||||
|
- name: Pack
|
||||||
|
run: dotnet pack --version-suffix ci.$GITHUB_RUN_NUMBER
|
||||||
|
- name: Publish
|
||||||
|
if: github.event_name == 'push' && github.ref_name == 'main'
|
||||||
|
run: dotnet nuget push -s https://nuget.ellpeck.de/v3/index.json **/*.nupkg -k ${{ secrets.BAGET_KEY }} -n
|
|
@ -1,20 +0,0 @@
|
||||||
variables:
|
|
||||||
- &image mcr.microsoft.com/dotnet/sdk:8.0-jammy
|
|
||||||
steps:
|
|
||||||
build:
|
|
||||||
image: *image
|
|
||||||
commands: dotnet build
|
|
||||||
test:
|
|
||||||
image: *image
|
|
||||||
commands: dotnet test --collect:"XPlat Code Coverage"
|
|
||||||
pack:
|
|
||||||
image: *image
|
|
||||||
commands: dotnet pack --version-suffix ci.$CI_PIPELINE_NUMBER
|
|
||||||
publish:
|
|
||||||
image: *image
|
|
||||||
when:
|
|
||||||
branch: main
|
|
||||||
event: push
|
|
||||||
commands: dotnet nuget push -s https://nuget.ellpeck.de/v3/index.json **/*.nupkg -k $BAGET_KEY -n
|
|
||||||
secrets:
|
|
||||||
- baget_key
|
|
Loading…
Reference in a new issue