Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
Update release.yml (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
teacher-zhou authored Dec 5, 2022
2 parents def8baf + 1f2ae18 commit 5f75b7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 52 deletions.
45 changes: 2 additions & 43 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,7 @@ on:
pull_request:
branches: [ "master" ]
jobs:
# SonarCloud:
# runs-on: windows-latest
# steps:
# - name: Set up JDK 11
# uses: actions/setup-java@v1
# with:
# java-version: 1.11
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
# - name: Cache SonarCloud packages
# uses: actions/cache@v1
# with:
# path: ~\sonar\cache
# key: ${{ runner.os }}-sonar
# restore-keys: ${{ runner.os }}-sonar
# - name: Cache SonarCloud scanner
# id: cache-sonar-scanner
# uses: actions/cache@v1
# with:
# path: .\.sonar\scanner
# key: ${{ runner.os }}-sonar-scanner
# restore-keys: ${{ runner.os }}-sonar-scanner
# - name: Install SonarCloud scanner
# if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
# shell: powershell
# run: |
# New-Item -Path .\.sonar\scanner -ItemType Directory
# dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
# - name: Build and analyze
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# shell: powershell
# run: |
# .\.sonar\scanner\dotnet-sonarscanner begin /k:"AchievedOwner_TDesignBlazor" /o:"playermaker" /d:sonar.login="2a3f1799901edb257281a8dc304c1617a2c02c26" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml
# dotnet build --no-incremental
# dotnet tool install --global dotnet-coverage
# dotnet-coverage collect 'dotnet test' -f xml -o 'coverage.xml'
# .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="2a3f1799901edb257281a8dc304c1617a2c02c26"

Codacy:
Codacy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -67,7 +26,7 @@ jobs:
with:
api-token: ${{ secrets.CODACY_ACCOUNT_TOKEN }}
coverage-reports: 'coverage.cobertura.xml'
DotNet:
DotNet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Release

on:
push:
branches: ['master']
tags:
- "*"

Expand All @@ -14,7 +13,7 @@ jobs:
- name: 迁出代码
uses: actions/checkout@v2

- name: Setup .NET 6
- name: Setup .NET Environment
uses: actions/setup-dotnet@v1
with:
dotnet-version: |
Expand All @@ -30,13 +29,7 @@ jobs:
Version=${{steps.version.outputs.full}}
echo "The version {$Version}"
dotnet build
dotnet pack ./src/TDesignBlazor/TDesignBlazor.csproj -c release --no-build -o ./pack -p:PackageVersion=$Version
dotnet pack ./src/TDesign/TDesign.csproj -c release --no-build -o ./pack -p:PackageVersion=$Version
dotnet nuget push './pack/*.nupkg' -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }} --skip-duplicate
- name: 上传工件
uses: actions/upload-artifact@v2
with:
name: package
path: publish/
retention-days: 5

0 comments on commit 5f75b7b

Please sign in to comment.