Skip to content

Commit 5958529

Browse files
authored
Merge pull request #182 from marklam/build-gh
2 parents 4e3f5d9 + 28dc9fd commit 5958529

File tree

16 files changed

+153
-79
lines changed

16 files changed

+153
-79
lines changed

.config/dotnet-tools.json

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,16 @@
33
"isRoot": true,
44
"tools": {
55
"paket": {
6-
"version": "8.0.3",
6+
"version": "9.0.2",
77
"commands": [
88
"paket"
9-
],
10-
"rollForward": false
9+
]
1110
},
1211
"fake-cli": {
13-
"version": "6.1.1",
12+
"version": "6.1.3",
1413
"commands": [
1514
"fake"
16-
],
17-
"rollForward": false
15+
]
1816
}
1917
}
2018
}

.github/workflows/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: CI Build
2+
3+
env:
4+
# Stop wasting time caching packages
5+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
6+
# Disable sending usage data to Microsoft
7+
DOTNET_CLI_TELEMETRY_OPTOUT: true
8+
9+
on:
10+
push:
11+
branches: [ master ]
12+
pull_request:
13+
branches: [ master ]
14+
15+
jobs:
16+
build:
17+
18+
runs-on: windows-latest
19+
permissions:
20+
packages: write
21+
contents: read
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
- name: Setup .NET Core
29+
uses: actions/setup-dotnet@v4
30+
with:
31+
dotnet-version: |
32+
8.0.x
33+
- name: Restore
34+
run: dotnet tool restore
35+
- name: Build
36+
run: dotnet build -c Release
37+
- name: Test
38+
run: dotnet test --no-build -c Release tests
39+
- name: Pack
40+
run: dotnet pack --no-restore -c Release --include-symbols -o bin
41+
- name: Upload Artifacts
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: nupkg-${{ matrix.runs-on }}
45+
path: ./bin/*nupkg
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Private Publish
2+
3+
env:
4+
# Stop wasting time caching packages
5+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
6+
# Disable sending usage data to Microsoft
7+
DOTNET_CLI_TELEMETRY_OPTOUT: true
8+
9+
on:
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
15+
runs-on: windows-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- name: Setup .NET Core
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: |
26+
8.0.x
27+
- name: Restore
28+
run: dotnet tool restore
29+
- name: Build
30+
run: dotnet build -c Release
31+
- name: Test
32+
run: dotnet test --no-build -c Release tests
33+
- name: Pack
34+
run: dotnet pack -c Release --include-symbols -o bin
35+
- name: Push Package to Local Feed
36+
run: dotnet nuget push bin\*.nupkg -s https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json -k ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: NuGet Publish
2+
3+
env:
4+
# Stop wasting time caching packages
5+
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
6+
# Disable sending usage data to Microsoft
7+
DOTNET_CLI_TELEMETRY_OPTOUT: true
8+
9+
on:
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
15+
runs-on: windows-latest
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- name: Setup .NET Core
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: |
26+
8.0.x
27+
- name: Restore
28+
run: dotnet tool restore
29+
- name: Build
30+
run: dotnet build -c Release
31+
- name: Test
32+
run: dotnet test --no-build -c Release tests
33+
- name: Pack
34+
run: dotnet pack --no-build -c Release --include-symbols -o bin
35+
- name: Push Package to NuGet.org
36+
run: dotnet nuget push bin\*.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_KEY }}

.paket/Paket.Restore.targets

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,14 +235,15 @@
235235
<Splits>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',').Length)</Splits>
236236
<PackageName>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0])</PackageName>
237237
<PackageVersion>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1])</PackageVersion>
238+
<Reference>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[2])</Reference>
238239
<AllPrivateAssets>$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4])</AllPrivateAssets>
239240
<CopyLocal Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 6">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5])</CopyLocal>
240241
<OmitContent Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 7">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6])</OmitContent>
241242
<ImportTargets Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 8">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7])</ImportTargets>
242243
<Aliases Condition="%(PaketReferencesFileLinesInfo.Splits) &gt;= 9">$([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[8])</Aliases>
243244
</PaketReferencesFileLinesInfo>
244-
<PackageReference Include="%(PaketReferencesFileLinesInfo.PackageName)">
245-
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
245+
<PackageReference Condition=" '$(ManagePackageVersionsCentrally)' != 'true' Or '%(PaketReferencesFileLinesInfo.Reference)' == 'Direct' " Include="%(PaketReferencesFileLinesInfo.PackageName)">
246+
<Version Condition=" '$(ManagePackageVersionsCentrally)' != 'true' ">%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
246247
<PrivateAssets Condition=" ('%(PaketReferencesFileLinesInfo.AllPrivateAssets)' == 'true') Or ('$(PackAsTool)' == 'true') ">All</PrivateAssets>
247248
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.CopyLocal) == 'false' or %(PaketReferencesFileLinesInfo.AllPrivateAssets) == 'exclude'">runtime</ExcludeAssets>
248249
<ExcludeAssets Condition=" %(PaketReferencesFileLinesInfo.OmitContent) == 'true'">$(ExcludeAssets);contentFiles</ExcludeAssets>
@@ -252,6 +253,10 @@
252253
<AllowExplicitVersion>true</AllowExplicitVersion>
253254

254255
</PackageReference>
256+
257+
<PackageVersion Include="%(PaketReferencesFileLinesInfo.PackageName)">
258+
<Version>%(PaketReferencesFileLinesInfo.PackageVersion)</Version>
259+
</PackageVersion>
255260
</ItemGroup>
256261

257262
<PropertyGroup>

.travis.yml

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

FSharp.Control.Reactive.sln

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ EndProject
77
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{8961FBE9-1BE3-4A44-9610-5B4386DC5848}"
88
ProjectSection(SolutionItems) = preProject
99
.gitignore = .gitignore
10-
.travis.yml = .travis.yml
11-
appveyor.yml = appveyor.yml
1210
build.cmd = build.cmd
1311
build.fsx = build.fsx
1412
build.sh = build.sh

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
F# wrappers for the [Reactive Extensions (Rx)](http://msdn.microsoft.com/en-us/data/gg577609.aspx)
44

55
[![NuGet Status](http://img.shields.io/nuget/v/FSharp.Control.Reactive.svg?style=flat)](https://www.nuget.org/packages/FSharp.Control.Reactive/)
6-
[![Build status](https://ci.appveyor.com/api/projects/status/12euia5l32c7prk7/branch/master)](https://ci.appveyor.com/project/panesofglass/fsharp-control-reactive/branch/master)
7-
[![Build Status](https://travis-ci.org/fsprojects/FSharp.Control.Reactive.svg?branch=master)](https://travis-ci.org/fsprojects/FSharp.Control.Reactive)
6+
[[![CI Build](https://github.com/fsprojects/FSharp.Control.Reactive/actions/workflows/build.yml/badge.svg)](https://github.com/fsprojects/FSharp.Control.Reactive/actions/workflows/build.yml)
87

98
## Maintainer(s)
109

appveyor.yml

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

build.ps1

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,4 @@
1-
[xml]$doc = Get-Content .\src\Directory.Build.props
2-
$version = $doc.Project.PropertyGroup.VersionPrefix # the version under development, update after a release
3-
$versionSuffix = '-build.0' # manually incremented for local builds
4-
5-
function isVersionTag($tag){
6-
$v = New-Object Version
7-
[Version]::TryParse($tag, [ref]$v)
8-
}
9-
10-
if ($env:appveyor){
11-
$versionSuffix = '-build.' + $env:appveyor_build_number
12-
if ($env:appveyor_repo_tag -eq 'true' -and (isVersionTag($env:appveyor_repo_tag_name))){
13-
$version = $env:appveyor_repo_tag_name
14-
$versionSuffix = ''
15-
}
16-
Update-AppveyorBuild -Version "$version$versionSuffix"
17-
}
18-
191
dotnet tool restore
20-
dotnet build -c Release /p:Version=$version$versionSuffix
2+
dotnet build -c Release
213
dotnet test --no-build -c Release tests
22-
dotnet pack --no-restore -c Release /p:Version=$version$versionSuffix -o $psscriptroot/bin
4+
dotnet pack --no-restore -c Release --include-symbols -o $psscriptroot/bin

0 commit comments

Comments
 (0)