Skip to content

Commit

Permalink
update workflow actions
Browse files Browse the repository at this point in the history
  • Loading branch information
MattEdwardsWaggleBee committed Apr 10, 2024
1 parent 0dff8dd commit 6e6887a
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 3 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Format

on:
push:
workflow_run:
workflows:
- Create Prerelease
- Create Release
types: [requested]
workflow_dispatch:
pull_request:
types: [opened,edited,synchronize,reopened]
branches:
- main
- develop

env:
DOTNET_VERSION: '8.0.x'

jobs:
format:
runs-on: ubuntu-latest

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

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Format
run: dotnet format

- name: Update Styles
run: |
git config --global user.name 'github-actions'
git config --global user.email '[email protected]'
git commit -am "Updated code formatting to match rules in .editorconfig"
git push
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v1
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v3
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}

Expand All @@ -53,7 +53,7 @@ jobs:
dotnet test --no-build --configuration ${{ env.BUILD_CONFIGURATION }} --logger:trx --results-directory:./TestResults ${{ env.SOLUTION_NAME }}
- name: Upload Test Results
uses: actions/upload-artifact@v3 # upload test results
uses: actions/upload-artifact@v4 # upload test results
if: success() || failure() # run this step even if previous step failed
with:
name: test-results
Expand Down

0 comments on commit 6e6887a

Please sign in to comment.