Skip to content

Commit fe548c2

Browse files
authored
Merge pull request #40 from HtmlUnit/feature/nuget-publish
NuGet publish
2 parents fdb3da6 + 3ed6c7c commit fe548c2

9 files changed

Lines changed: 2526 additions & 2543 deletions

File tree

.github/workflows/build.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
runs-on: windows-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
18+
- uses: microsoft/setup-msbuild@v1
19+
- uses: NuGet/setup-nuget@v1.0.5
20+
21+
- name: Restore NuGet packages
22+
run: nuget restore NHtmlUnit.sln
23+
24+
- uses: gittools/actions/gitversion/setup@v0.9.9
25+
with:
26+
versionSpec: '5.x.x'
27+
28+
- uses: gittools/actions/gitversion/execute@v0.9.9
29+
id: gitversion # step id used as reference for output values
30+
with:
31+
updateAssemblyInfo: true
32+
33+
- name: Build Solution
34+
run: msbuild NHtmlUnit.sln /property:Configuration=Release
35+
36+
- name: Test Solution
37+
run: packages\NUnit.ConsoleRunner.3.12.0\tools\nunit3-console.exe tests\IntegrationTests\bin\Release\IntegrationTests.dll
38+
39+
- name: Create NuGet Package
40+
run: nuget.exe pack NHtmlUnit.nuspec -Verbosity detailed -Symbols -Properties Configuration=Release -Version ${{ steps.gitversion.outputs.nuGetVersion }}
41+
42+
- uses: actions/upload-artifact@v2
43+
with:
44+
name: NHtmlUnit.nupkg
45+
path: '*.nupkg'
46+
47+
release:
48+
runs-on: ubuntu-latest
49+
needs: build
50+
if: startsWith(github.ref, 'refs/tags/') # Only release tagged commits
51+
52+
steps:
53+
- uses: actions/download-artifact@v2
54+
with:
55+
name: NHtmlUnit.nupkg
56+
57+
- name: Upload .nupkg to release
58+
uses: meeDamian/github-release@2.0
59+
with:
60+
token: ${{ secrets.GITHUB_TOKEN }}
61+
files: '*.nupgk'
62+
63+
publish:
64+
runs-on: ubuntu-latest
65+
needs: build
66+
67+
steps:
68+
- uses: actions/download-artifact@v2
69+
with:
70+
name: NHtmlUnit.nupkg
71+
72+
- uses: NuGet/setup-nuget@v1.0.5
73+
74+
- name: Publish To NuGet.org
75+
# if: startsWith(github.ref, 'refs/tags/') # Only publish tagged commits
76+
run: nuget push *.nupkg -Source nuget.org -ApiKey ${{ secrets.NUGET_API_KEY }}

.github/workflows/unittests.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

NHtmlUnit.nuspec

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
<title>NHtmlUnit</title>
77
<authors>OKB AS</authors>
88
<owners>OKB AS</owners>
9-
<licenseUrl>http://www.apache.org/licenses/LICENSE-2.0</licenseUrl>
9+
<license type="expression">Apache-2.0</license>
1010
<projectUrl>https://github.com/HtmlUnit/NHtmlUnit</projectUrl>
1111
<requireLicenseAcceptance>false</requireLicenseAcceptance>
1212
<description>NHtmlUnit is a .NET wrapper of HtmlUnit; a "GUI-less browser for Java programs". It allows you to write code to test web applications with a headless, automated browser.</description>
13-
<releaseNotes>Updated to version 7.4.5196 of IKVM.</releaseNotes>
13+
<releaseNotes>Updated to HtmlUnit 2.50</releaseNotes>
1414
<copyright>Copyright © OKB AS 2021</copyright>
1515
<tags>testing htmlunit nhtmlunit headless browser</tags>
1616
<dependencies>
17-
<dependency id="IKVM" version="7.4.5196.0" />
17+
<dependency id="IKVM" version="8.1.5717" />
1818
</dependencies>
1919
<frameworkAssemblies />
2020
<references />

app/NHtmlUnit/NHtmlUnit.csproj

Lines changed: 2184 additions & 2191 deletions
Large diffs are not rendered by default.

app/NHtmlUnit/packages.config

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
2-
<packages>
3-
<package id="GitVersionTask" version="3.5.2" targetFramework="net45" developmentDependency="true" />
4-
<package id="IKVM" version="8.1.5717.0" targetFramework="net45" />
5-
</packages>
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<packages>
3+
<package id="IKVM" version="8.1.5717.0" targetFramework="net45" />
4+
</packages>

0 commit comments

Comments
 (0)