Skip to content

Commit

Permalink
Update build.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
hishamco committed Feb 28, 2023
1 parent 5cabb98 commit f04a791
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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}}

0 comments on commit f04a791

Please sign in to comment.