Skip to content

Commit

Permalink
Added files for github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
gmiserez committed Oct 8, 2024
1 parent 5f4744d commit 63f7911
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Pull Request

on:
pull_request:
branches: ['master']

jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6
7
8
- name: Build, Test and Sonar
uses: swisslife-oss/actions/pull-request@main
with:
sonar_token: ${{ secrets.SONAR_TOKEN }}
sonar_project_key: 'SwissLife-OSS_HotChocolateExtensions'
sonar_project_name: 'hotchocolate-extensions'
pr_number: ${{ github.event.pull_request.number }}
pr_source_branch: ${{ github.head_ref }}
pr_target_branch: ${{ github.base_ref }}
github_repository: ${{ github.repository }}
sonar_exclusions: ${{ vars.SONAR_EXCLUSIONS }}
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Release

on:
push:
tags:
- "*"

jobs:
release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Use .NET SDK from global.json
uses: actions/setup-dotnet@v3
- name: Build, Test and Push
uses: swisslife-oss/actions/release-packages@main
with:
tag: ${{ github.ref_name }}
nuget_api_key: ${{ secrets.NUGET_API_KEY }}
enable_push: 'yes'

sonar:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6
7
8
- name: Restore tools
run: dotnet tool restore
- name: Build, Test and Sonar
uses: swisslife-oss/actions/release-sonar@main
with:
tag: ${{ github.ref_name }}
sonar_token: ${{ secrets.SONAR_TOKEN }}
sonar_project_key: 'SwissLife-OSS_HotChocolateExtensions'
sonar_project_name: 'hotchocolate-extensions'
sonar_exclusions: ${{ vars.SONAR_EXCLUSIONS }}

0 comments on commit 63f7911

Please sign in to comment.