Skip to content

Commit 82ef663

Browse files
committed
re-enable nuget in pipeline
1 parent 0250734 commit 82ef663

File tree

3 files changed

+95
-95
lines changed

3 files changed

+95
-95
lines changed

.github/workflows/build.yml

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -46,73 +46,73 @@ jobs:
4646
- name: "Dotnet Cake Test"
4747
run: dotnet cake --target=Test
4848
shell: pwsh
49-
# - name: "Dotnet Cake Pack"
50-
# run: dotnet cake --target=Pack
51-
# shell: pwsh
52-
# - name: "Publish Artefacts"
53-
# uses: actions/[email protected]
54-
# if: always()
55-
# with:
56-
# name: ${{matrix.os}}
57-
# path: "./Artefacts"
49+
- name: "Dotnet Cake Pack"
50+
run: dotnet cake --target=Pack
51+
shell: pwsh
52+
- name: "Publish Artefacts"
53+
uses: actions/[email protected]
54+
if: always()
55+
with:
56+
name: ${{matrix.os}}
57+
path: "./Artefacts"
58+
59+
publish-test-results:
60+
name: "Publish Tests Results"
61+
needs: build
62+
if: always()
63+
permissions:
64+
checks: write
65+
pull-requests: write
66+
runs-on: ubuntu-latest
67+
steps:
68+
- name: "Download Artefact"
69+
uses: actions/[email protected]
70+
with:
71+
path: "./Artefacts"
72+
- name: "Publish Test Summary"
73+
uses: test-summary/action@v2
74+
if: always()
75+
with:
76+
paths: "./Artefacts/*/*.xml"
77+
78+
push-github-packages:
79+
name: "Push GitHub Packages"
80+
needs: build
81+
if: github.ref == 'refs/heads/main' || github.event_name == 'release'
82+
environment:
83+
name: "GitHub Packages"
84+
url: https://github.com/TimmyMC/Schema.NET/packages
85+
permissions:
86+
packages: write
87+
runs-on: windows-latest
88+
steps:
89+
- name: "Download Artefact"
90+
uses: actions/[email protected]
91+
with:
92+
name: "windows-latest"
93+
- name: "Dotnet NuGet Add Source"
94+
run: dotnet nuget add source https://nuget.pkg.github.com/TimmyMC/index.json --name GitHub --username TimmyMC --password ${{secrets.GITHUB_TOKEN}}
95+
shell: pwsh
96+
- name: "Dotnet NuGet Push"
97+
run: dotnet nuget push .\*.nupkg --api-key ${{ github.token }} --source GitHub --skip-duplicate
98+
shell: pwsh
5899

59-
# publish-test-results:
60-
# name: "Publish Tests Results"
61-
# needs: build
62-
# if: always()
63-
# permissions:
64-
# checks: write
65-
# pull-requests: write
66-
# runs-on: ubuntu-latest
67-
# steps:
68-
# - name: "Download Artefact"
69-
# uses: actions/[email protected]
70-
# with:
71-
# path: "./Artefacts"
72-
# - name: "Publish Test Summary"
73-
# uses: test-summary/action@v2
74-
# if: always()
75-
# with:
76-
# paths: "./Artefacts/*/*.xml"
77-
#
78-
# push-github-packages:
79-
# name: "Push GitHub Packages"
80-
# needs: build
81-
# if: github.ref == 'refs/heads/main' || github.event_name == 'release'
82-
# environment:
83-
# name: "GitHub Packages"
84-
# url: https://github.com/RehanSaeed/Schema.NET/packages
85-
# permissions:
86-
# packages: write
87-
# runs-on: windows-latest
88-
# steps:
89-
# - name: "Download Artefact"
90-
# uses: actions/[email protected]
91-
# with:
92-
# name: "windows-latest"
93-
# - name: "Dotnet NuGet Add Source"
94-
# run: dotnet nuget add source https://nuget.pkg.github.com/RehanSaeed/index.json --name GitHub --username RehanSaeed --password ${{secrets.GITHUB_TOKEN}}
95-
# shell: pwsh
96-
# - name: "Dotnet NuGet Push"
97-
# run: dotnet nuget push .\*.nupkg --api-key ${{ github.token }} --source GitHub --skip-duplicate
98-
# shell: pwsh
99-
#
100-
# push-nuget:
101-
# name: "Push NuGet Packages"
102-
# needs: build
103-
# if: github.event_name == 'release'
104-
# environment:
105-
# name: "NuGet"
106-
# url: https://www.nuget.org/packages/Schema.NET
107-
# runs-on: windows-latest
108-
# steps:
109-
# - name: "Download Artefact"
110-
# uses: actions/[email protected]
111-
# with:
112-
# name: "windows-latest"
113-
# - name: "Dotnet NuGet Push"
114-
# run: |
115-
# Get-ChildItem .\ -Filter *.nupkg |
116-
# Where-Object { !$_.Name.Contains('preview') } |
117-
# ForEach-Object { dotnet nuget push $_ --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{secrets.NUGET_API_KEY}} }
118-
# shell: pwsh
100+
push-nuget:
101+
name: "Push NuGet Packages"
102+
needs: build
103+
if: github.event_name == 'release'
104+
environment:
105+
name: "NuGet"
106+
url: https://www.nuget.org/packages/Schema.NET
107+
runs-on: windows-latest
108+
steps:
109+
- name: "Download Artefact"
110+
uses: actions/[email protected]
111+
with:
112+
name: "windows-latest"
113+
- name: "Dotnet NuGet Push"
114+
run: |
115+
Get-ChildItem .\ -Filter *.nupkg |
116+
Where-Object { !$_.Name.Contains('preview') } |
117+
ForEach-Object { dotnet nuget push $_ --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{secrets.NUGET_API_KEY}} }
118+
shell: pwsh
Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
#name: Release Drafter
2-
#
3-
#on:
4-
# push:
5-
# branches:
6-
# - main
7-
# pull_request_target:
8-
# types:
9-
# - edited
10-
# - opened
11-
# - reopened
12-
# - synchronize
13-
# workflow_dispatch:
14-
#
15-
#jobs:
16-
# update_release_draft:
17-
# permissions:
18-
# contents: write
19-
# pull-requests: write
20-
# runs-on: ubuntu-latest
21-
# steps:
22-
# - name: "Draft Release"
23-
# uses: release-drafter/[email protected]
24-
# env:
25-
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
types:
9+
- edited
10+
- opened
11+
- reopened
12+
- synchronize
13+
workflow_dispatch:
14+
15+
jobs:
16+
update_release_draft:
17+
permissions:
18+
contents: write
19+
pull-requests: write
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: "Draft Release"
23+
uses: release-drafter/[email protected]
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Source/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</ItemGroup>
2121

2222
<ItemGroup Label="Files">
23-
<None Include="..\..\Images\Icon.png" Pack="true" PackagePath="\" />
23+
<!-- <None Include="..\..\Images\Icon.png" Pack="true" PackagePath="\" />-->
2424
<None Include="..\..\README.md" Pack="true" PackagePath="\" />
2525
</ItemGroup>
2626

0 commit comments

Comments
 (0)