Skip to content

Commit

Permalink
Fixed release version retrieving
Browse files Browse the repository at this point in the history
  • Loading branch information
xperiandri committed Feb 15, 2024
1 parent 7585751 commit 3ba4016
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/publish_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
dotnet-version: 7.0.401

- name: Add the GitHub source
run: dotnet nuget add source --username USERNAME --password ${{secrets.GITHUB_TOKEN}} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/fsprojects/index.json"
run: dotnet nuget add source --username USERNAME --password ${{secrets.GITHUB_TOKEN}} --store-password-in-clear-text --name "github.com" "https://nuget.pkg.github.com/fsprojects/index.json"

- name: Install local tools
run: dotnet tool restore
Expand All @@ -45,39 +45,39 @@ jobs:
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Shared project to GitHub
run: |
dotnet nuget push nuget/*Shared*.nupkg -s "github" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
dotnet nuget push nuget/*Shared*.nupkg -s "github.com" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Client project
run: |
cd src/FSharp.Data.GraphQL.Client
dotnet pack --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Client project to GitHub
run: |
dotnet nuget push nuget/*Client*.nupkg -s "github" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
dotnet nuget push nuget/*Client*.nupkg -s "github.com" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Server project
run: |
cd src/FSharp.Data.GraphQL.Server
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Server project to GitHub
run: |
dotnet nuget push nuget/*Server*.nupkg -s "github" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
dotnet nuget push nuget/*Server*.nupkg -s "github.com" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Server.Relay project
run: |
cd src/FSharp.Data.GraphQL.Server.Relay
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Server.Relay project to GitHub
run: |
dotnet nuget push nuget/*Server.Relay*.nupkg -s "github" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
dotnet nuget push nuget/*Server.Relay*.nupkg -s "github.com" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Server.Middleware project
run: |
cd src/FSharp.Data.GraphQL.Server.Middleware
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Server.Middleware project to GitHub
run: |
dotnet nuget push nuget/*Server.Middleware*.nupkg -s "github" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
dotnet nuget push nuget/*Server.Middleware*.nupkg -s "github.com" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
- name: Prepare the sample project to be packed as a project template
run: |
Expand All @@ -91,5 +91,5 @@ jobs:
- name: Publish FSharp.Data.GraphQL.ProjectTemplates project to GitHub
run: |
$path = "nuget/FSharp.Data.GraphQL.ProjectTemplates.$Env:VERSION.nupkg"
dotnet nuget push $path -s "github" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
dotnet nuget push $path -s "github.com" -k ${{secrets.GITHUB_TOKEN}} --skip-duplicate
shell: pwsh
14 changes: 7 additions & 7 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- name: Set Build Version
run: |
$version = "$env:GITHUB_REF_NAME"
$version = "$env:GITHUB_REF_NAME".Substring("releases/".Length)
$File = (
Select-Xml -XPath "/Project/PropertyGroup[@Label='NuGet']/Version" -Path "Directory.Build.props"
)[0].Node
Expand All @@ -44,39 +44,39 @@ jobs:
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Shared project to NuGet
run: |
dotnet nuget push nuget/*Shared*.nupkg -k ${{secrets.NUGET_SECRET}} --skip-duplicate
dotnet nuget push nuget/*Shared*.nupkg -s "nuget.org" -k ${{secrets.NUGET_SECRET}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Client project
run: |
cd src/FSharp.Data.GraphQL.Client
dotnet pack --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Client project to NuGet
run: |
dotnet nuget push nuget/*Client*.nupkg -k ${{secrets.NUGET_SECRET}} --skip-duplicate
dotnet nuget push nuget/*Client*.nupkg -s "nuget.org" -k ${{secrets.NUGET_SECRET}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Server project
run: |
cd src/FSharp.Data.GraphQL.Server
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Server project to NuGet
run: |
dotnet nuget push nuget/*Server*.nupkg -k ${{secrets.NUGET_SECRET}} --skip-duplicate
dotnet nuget push nuget/*Server*.nupkg -s "nuget.org" -k ${{secrets.NUGET_SECRET}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Server.Relay project
run: |
cd src/FSharp.Data.GraphQL.Server.Relay
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Server.Relay project to NuGet
run: |
dotnet nuget push nuget/*Server.Relay*.nupkg -k ${{secrets.NUGET_SECRET}} --skip-duplicate
dotnet nuget push nuget/*Server.Relay*.nupkg -s "nuget.org" -k ${{secrets.NUGET_SECRET}} --skip-duplicate
- name: Pack FSharp.Data.GraphQL.Server.Middleware project
run: |
cd src/FSharp.Data.GraphQL.Server.Middleware
dotnet pack --no-build --nologo --configuration Release /p:IsNuGet=true /p:ContinuousIntegrationBuild=true -o ../../nuget
- name: Publish FSharp.Data.GraphQL.Server.Middleware project to NuGet
run: |
dotnet nuget push nuget/*Server.Middleware*.nupkg -k ${{secrets.NUGET_SECRET}} --skip-duplicate
dotnet nuget push nuget/*Server.Middleware*.nupkg -s "nuget.org" -k ${{secrets.NUGET_SECRET}} --skip-duplicate
- name: Prepare the sample project to be packed as a project template
run: |
Expand All @@ -90,5 +90,5 @@ jobs:
- name: Publish FSharp.Data.GraphQL.ProjectTemplates project to GitHub
run: |
$path = "nuget/FSharp.Data.GraphQL.ProjectTemplates.$Env:VERSION.nupkg"
dotnet nuget push $path -k ${{secrets.NUGET_SECRET}} --skip-duplicate
dotnet nuget push $path -s "nuget.org" -k ${{secrets.NUGET_SECRET}} --skip-duplicate
shell: pwsh
6 changes: 3 additions & 3 deletions Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<MicrosoftExtensionsVersion>7.0.*</MicrosoftExtensionsVersion>
<AspNetCoreVersion>7.0.*</AspNetCoreVersion>
<FsToolkitVersion>4.9.*</FsToolkitVersion>
<XUnitVersion>2.5.0</XUnitVersion>
<XUnitVersion>2.6.6</XUnitVersion>
<FAKEVersion>6.*</FAKEVersion>
</PropertyGroup>
<ItemGroup Label="Common">
Expand Down Expand Up @@ -45,7 +45,7 @@
<ItemGroup Label="Test platform">
<PackageReference Update="BenchmarkDotNet" Version="0.13.*" />
<PackageReference Update="BenchmarkDotNet.Annotations" Version="0.*" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.7.0" />
<PackageReference Update="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Update="Microsoft.TestPlatform.TestHost" Version="17.7.*" />
<PackageReference Update="Microsoft.TestPlatform.ObjectModel" Version="17.7.*" />
<PackageReference Update="xunit" Version="$(XUnitVersion)" />
Expand All @@ -56,7 +56,7 @@
<PackageReference Update="xunit.extensibility.execution" Version="$(XUnitVersion)" />
<PackageReference Update="xunit.runner.console" Version="$(XUnitVersion)" />
<PackageReference Update="xunit.runner.utility" Version="$(XUnitVersion)" />
<PackageReference Update="xunit.runner.visualstudio" Version="$(XUnitVersion)" />
<PackageReference Update="xunit.runner.visualstudio" Version="2.5.6" />
</ItemGroup>
<ItemGroup Label="Tests and Samples">
<PackageReference Update="CommandLineParser" Version="2.9.*" />
Expand Down

0 comments on commit 3ba4016

Please sign in to comment.