Skip to content

Commit

Permalink
Merge pull request #60 from Hau-Hau/7-release-workflow
Browse files Browse the repository at this point in the history
Fix pipelines
  • Loading branch information
Hau-Hau authored Sep 17, 2024
2 parents 3ed3034 + 2ab739c commit d4f9091
Show file tree
Hide file tree
Showing 6 changed files with 40 additions and 61 deletions.
13 changes: 13 additions & 0 deletions .github/actions/setup-dotnet-action/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Setup dotnet
description: Setup dotnet environment
runs:
using: "composite"
steps:
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
26 changes: 0 additions & 26 deletions .github/workflows/action-setup-project.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/action-test.yml

This file was deleted.

15 changes: 9 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: ./.github/workflows/action-setup-project.yml
with:
configuration: Debug
- uses: actions/checkout@v4

- uses: ./.github/actions/setup-dotnet-action

- name: Build
run: dotnet build ./EncryptedConfigValue.sln --configuration Release

- name: Test
uses: ./.github/workflows/action-test.yml
with:
build: false
run: dotnet test --no-restore --verbosity normal

# TODO add release github and release nuget jobs
12 changes: 11 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,14 @@ on:
branches: [ main ]
jobs:
test:
uses: ./.github/workflows/action-test.yml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/action-setup-dotnet

- name: Build
run: dotnet build ./EncryptedConfigValue.sln --configuration Debug

- name: Test
run: dotnet test --no-restore --verbosity normal
12 changes: 7 additions & 5 deletions .github/workflows/update-nuspec.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: Update nuspec files

on:
workflow_dispatch:
pull_request:
types: [closed]
branches:
Expand All @@ -18,6 +17,8 @@ jobs:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4

- name: Setup env variables
run: |
TARGET_BRANCH_NAME="bot/update-nuspec"
Expand All @@ -36,11 +37,12 @@ jobs:
else
git checkout -b $TARGET_BRANCH_NAME
fi
- uses: ./.github/workflows/action-setup-project.yml
with:
configuration: Debug
- uses: ./.github/actions/action-setup-dotnet

- name: Build
run: dotnet build ./EncryptedConfigValue.sln --configuration Debug

- name: Update EncryptedConfigValue.Net.Module.nuspec
shell: pwsh
run: |
Expand Down

0 comments on commit d4f9091

Please sign in to comment.