Skip to content

Commit

Permalink
Set up CI
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahStolk committed Sep 12, 2023
1 parent 1f32e17 commit 9348861
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: nuget
directory: "/src"
schedule:
interval: daily
20 changes: 20 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
on:
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Set up dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.400'
include-prerelease: false
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: dotnet build src/DevilDaggersInfo.Core.sln -c Release
- name: Test
run: dotnet test src/DevilDaggersInfo.Core.sln -c Release --no-build
26 changes: 26 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Set up dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.0.400'
include-prerelease: false
- name: Checkout
uses: actions/checkout@v2
- name: Build
run: dotnet build src/DevilDaggersInfo.Core.sln -c Release
- name: Test
run: dotnet test src/DevilDaggersInfo.Core.sln -c Release --no-build
- name: Pack
run: dotnet pack src/DevilDaggersInfo.Core -c Release -o .
- name: Push
run: dotnet nuget push *.nupkg -s github -k ${NUGET_SECRET} -n --skip-duplicate
env:
NUGET_SECRET: ${{ secrets.NUGET_SECRET }}
4 changes: 0 additions & 4 deletions src/nuget.config
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,10 @@
<packageSources>
<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="Pomelo" value="https://pkgs.dev.azure.com/pomelo-efcore/Pomelo.EntityFrameworkCore.MySql/_packaging/pomelo-efcore-public/nuget/v3/index.json" />
</packageSources>
<packageSourceMapping>
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
<packageSource key="Pomelo">
<package pattern="Pomelo*" />
</packageSource>
</packageSourceMapping>
</configuration>

0 comments on commit 9348861

Please sign in to comment.