diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b070e01..8b2e206 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,11 +1,8 @@ name: My.Extensions.Localization.Json on: - push: - branches: dev - release: - types: - - published + pull_request: + branches: [ main ] env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true @@ -16,23 +13,14 @@ jobs: name: Build windows-latest runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 3.1.301 + dotnet-version: 7.0.* - name: Install Dependencies run: dotnet restore - name: Build run: dotnet build --configuration Release --no-restore - name: Test run: dotnet test --no-restore --verbosity normal - - name: Pack - run: | - dotnet pack --configuration Release --output nupkg -p:RepositoryUrl=${{ github.server_url }}/${{ github.repository }} --version-suffix preview-$(date +%Y%m%d%H%M%S) - # dotnet pack src/My.Extensions.Localization.Json/My.Extensions.Localization.Json.csproj --output nupkg --configuration Release -p:RepositoryUrl=${{ github.server_url }}/${{ github.repository }} --version-suffix preview-$(date +%Y%m%d%H%M%S) - - name: 'Push GitHub Packages' - run: | - dotnet nuget add source https://nuget.pkg.github.com/OrchardCoreContrib/index.json --name GitHub --username hishamco --password ${{secrets.GITHUB_TOKEN}} - dotnet tool update gpr -g - gpr push .\nupkg\*.nupkg -k ${{secrets.GITHUB_TOKEN}}