Skip to content

Commit

Permalink
Add more actions
Browse files Browse the repository at this point in the history
  • Loading branch information
alexaka1 committed Jul 7, 2024
1 parent f57b318 commit 9d82578
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
33 changes: 29 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
- main
- feature/changesets
concurrency: ${{ github.workflow }}-${{ github.ref }}
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
DOTNET_VERSION: 8.0.x
NODE_VERSION: 20.x
jobs:
release:
name: Release
Expand All @@ -19,12 +24,31 @@ jobs:
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false
- name: Setup Node.js 20.x
- name: Setup dotnet 8
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: 20.x


node-version: ${{ env.NODE_VERSION }}
- name: Corepack
run: corepack enable
- name: Install Dependencies
run: yarn install --immutable
- name: Dotnet restore
run: dotnet restore **./*.csproj --locked-mode
- name: Dotnet build
run: dotnet build **./*.csproj --configuration Release --no-restore
- name: Test with dotnet
run: dotnet test --configuration Release --no-restore --logger trx --results-directory "TestResults"
- name: Upload dotnet test results
uses: actions/upload-artifact@v4
with:
name: dotnet-results
path: TestResults
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
Expand All @@ -38,3 +62,4 @@ jobs:
# You can do something when a publish should happen.
run: |
echo "Publishing to nuget"
dotnet pack src/Serilog.Extensions.Formatting -c Release --version-suffix beta -o ./artifacts
2 changes: 1 addition & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dotnet pack src/Serilog.Extensions.Formatting -c Relase --version-suffix beta -o ./artifacts
dotnet pack src/Serilog.Extensions.Formatting -c Release --version-suffix beta -o ./artifacts
dotnet nuget push ./artifacts/*.nupkg -s https://api.nuget.org/v3/index.json -k $NUGET_API_KEY

0 comments on commit 9d82578

Please sign in to comment.