Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
Updated Github actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jscarle committed Dec 16, 2022
1 parent 13c2b40 commit d71de20
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "nuget" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
7 changes: 7 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# .github/release.yml

changelog:
categories:
- title: Changes
labels:
- "*"
33 changes: 33 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Development

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]

jobs:
build:
name: Build
runs-on: windows-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Debug --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
39 changes: 39 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Release

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
name: Build
runs-on: windows-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: 'csharp'
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
7 changes: 4 additions & 3 deletions .github/workflows/msbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v3

- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.1

- name: Restore NuGet packages
working-directory: ${{env.GITHUB_WORKSPACE}}
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Publish

on:
release:
types: [published]

jobs:
build:
name: Build
runs-on: windows-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Pack
run: dotnet pack --configuration Release --no-build --output .
- name: Push to NuGet
run: dotnet nuget push "*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json

0 comments on commit d71de20

Please sign in to comment.