- try fixing deploy

pull/59/head
Simon G 3 years ago committed by GitHub
parent 026779691e
commit ffc74a1043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 32
      .github/workflows/deploy.yml

@ -5,8 +5,8 @@ on:
types: [published] types: [published]
jobs: jobs:
nuget: Deploy:
name: NuGet name: Deploy
runs-on: windows-latest runs-on: windows-latest
steps: steps:
@ -15,32 +15,20 @@ jobs:
- uses: actions/setup-dotnet@v1 - uses: actions/setup-dotnet@v1
with: with:
dotnet-version: '6.0.x' dotnet-version: '6.0.x'
- name: Deploy to NuGet Gallery - name: Build
run: dotnet build -c Release -o output
- name: Deploy to nuGet gallery
env: env:
NUGET_KEY: ${{ secrets.NUGET_KEY }} NUGET_KEY: ${{ secrets.NUGET_KEY }}
run: | run: dotnet nuget push output\LightweightIocContainer.*.nupkg -k $env:NUGET_KEY -s https://api.nuget.org/v3/index.json
dotnet build -c Release -o nugetOut - name: Deploy to gitHub package registry
dotnet nuget push nugetOut\LightweightIocContainer.*.nupkg -k $env:NUGET_KEY -s https://api.nuget.org/v3/index.json
github:
name: GitHub
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/setup-dotnet@v1
with:
dotnet-version: '6.0.x'
- name: Deploy to GitHub Package Registry
env: env:
GH_PACKAGE_REGISTRY_KEY: ${{ secrets.GH_PACKAGE_REGISTRY_KEY }} GH_PACKAGE_REGISTRY_KEY: ${{ secrets.GH_PACKAGE_REGISTRY_KEY }}
run: | run: |
dotnet build -c Release -o githubOut
dotnet nuget add source "https://nuget.pkg.github.com/SimonG96/index.json" --name "GithubPackageRegistry" --username SimonG96 --password $env:GH_PACKAGE_REGISTRY_KEY dotnet nuget add source "https://nuget.pkg.github.com/SimonG96/index.json" --name "GithubPackageRegistry" --username SimonG96 --password $env:GH_PACKAGE_REGISTRY_KEY
dotnet nuget push githubOut\LightweightIocContainer.*.nupkg -s "GithubPackageRegistry" dotnet nuget push output\LightweightIocContainer.*.nupkg -s "GithubPackageRegistry"
- name: Upload the artifacts to release - name: Upload the artifacts to github release
uses: AButler/upload-release-assets@v2.0 uses: AButler/upload-release-assets@v2.0
with: with:
files: 'githubOut\LightweightIocContainer.*nupkg' files: 'output/LightweightIocContainer*nupkg'
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}

Loading…
Cancel
Save