Skip to content

Set release version to 2.0.0-beta1 #174

Set release version to 2.0.0-beta1

Set release version to 2.0.0-beta1 #174

Workflow file for this run

name: publish to GitHub
on:
push:
branches:
- dev
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Build Version
run: |
$File = (
Select-Xml -XPath "/Project/PropertyGroup[@Label='NuGet']/Version" -Path "Directory.Build.props"
)[0].Node
$version = "$($File.InnerText)-ci-$Env:GITHUB_RUN_ID"
$File.InnerText = $version
$File.OwnerDocument.Save((Join-Path $PWD.ProviderPath Directory.Build.props))
echo "VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
shell: pwsh
- name: Install .NET Core
uses: actions/setup-dotnet@v3
with:
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"
- name: Install local tools
run: dotnet tool restore
- name: Run integration tests
run: dotnet run --project build/Build.fsproj
- name: Pack FSharp.Data.GraphQL.Shared project
run: |
cd src/FSharp.Data.GraphQL.Shared
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
- 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
- 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
- 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
- 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
- name: Prepare the sample project to be packed as a project template
run: |
& "./Prepare template project for packing.ps1"
shell: pwsh
- name: Pack FSharp.Data.GraphQL.ProjectTemplates template project
run: |
cd samples
dotnet pack --nologo --configuration Release /p:ContinuousIntegrationBuild=true -o ../nuget
- 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
shell: pwsh