Skip to content

Commit

Permalink
Update Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
rameel committed Sep 13, 2024
1 parent d1cc10e commit 6a0d60c
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 17 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,34 @@ on:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-[a-z]+.[0-9]+"

permissions:
contents: write

jobs:
publish:
name: Publish packages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
steps:
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Build
- name: Checkout
uses: actions/checkout@v4

- name: Build Solution
run: dotnet build -c Release

- name: Pack
- name: Create NuGet Packages
run: dotnet pack -c Release -o ./nuget --no-build

- name: Publish
- name: Publish NuGet Packages
run: dotnet nuget push ./nuget/*.nupkg --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate -s https://api.nuget.org/v3/index.json

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
draft: true
files: nuget/*
23 changes: 13 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,27 @@ on:

jobs:
build-and-test:

name: build-and-test-${{ matrix.os }}
runs-on: ${{ matrix.os }}
name: "Test projects, ${{ matrix.os.name }}"
runs-on: ${{ matrix.os.id }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
os:
- id: windows-latest
name: Windows
- id: ubuntu-latest
name: Ubuntu

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup .NET
- name: Install .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Build
- name: Checkout
uses: actions/checkout@v4

- name: Build Solution
run: dotnet build -c Debug

- name: Test
- name: Test Projects
run: dotnet test -c Debug --no-build

0 comments on commit 6a0d60c

Please sign in to comment.