Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
circleci config to release to GitHub with .NET Core 3.0 Single Executable-file
version: 2.1
executors:
dotnet3:
docker:
- image: mcr.microsoft.com/dotnet/core/sdk:3.0
environment:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "true"
NUGET_XMLDOC_MODE: skip
go:
docker:
- image: circleci/golang
jobs:
build-singlepackage:
executor: dotnet3
steps:
- checkout
- run: dotnet publish ./src/MySQLToCsharp/ -c Release -o ./MySQLToCsharp -r win-x64 -p:PublishSingleFile=true -p:Version=${CIRCLE_TAG}
- run: dotnet publish ./src/MySQLToCsharp/ -c Release -o ./MySQLToCsharp -r linux-x64 -p:PublishSingleFile=true -p:Version=${CIRCLE_TAG}
- run: dotnet publish ./src/MySQLToCsharp/ -c Release -o ./MySQLToCsharp -r osx-x64 -p:PublishSingleFile=true -p:Version=${CIRCLE_TAG}
- persist_to_workspace:
root: .
paths:
- ./MySQLToCsharp
upload-github:
executor: go
steps:
- attach_workspace:
at: ./artifacts
- run: go get github.com/tcnksm/ghr
- run: ghr -t ${GITHUB_TOKEN} -u ${CIRCLE_PROJECT_USERNAME} -r ${CIRCLE_PROJECT_REPONAME} -delete ${CIRCLE_TAG} ./artifacts/MySQLToCsharp/
- store_artifacts:
path: ./artifacts/MySQLToCsharp
workflows:
build-and-push:
jobs:
- build-singlepackage:
filters:
tags:
only: /^\d+\.\d+\.\d+$/
branches:
ignore: /.*/
- upload-github:
requires:
- build-singlepackage
filters:
tags:
only: /^\d+\.\d+\.\d+$/
branches:
ignore: /.*/
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
<LangVersion>latest</LangVersion>
<Version>0.1.0</Version>
<AssemblyVersion>$(Version)</AssemblyVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(PublishSingleFile)' == 'true'">
<AssemblyName>MySQLToCsharp_$(RuntimeIdentifier)_$(Version)</AssemblyName>
<TargetFramework>netcoreapp3.0</TargetFramework>
<PublishSingleFile>true</PublishSingleFile>
<PublishTrimmed>true</PublishTrimmed>
<IncludeSymbolsInSingleFile>true</IncludeSymbolsInSingleFile>
</PropertyGroup>
</Project>
@MSBGMartha88

This comment has been minimized.

Copy link

MSBGMartha88 commented Aug 28, 2019

I guess I have some misconfigurations. Can you explain me the most important .NET Core 3.0 configurations after installation ^^

@guitarrapc

This comment has been minimized.

Copy link
Owner Author

guitarrapc commented Aug 29, 2019

What is your actual problem?
You can check my repo for .NET Core 3.0 CI workflow https://github.com/KinocoLLC/MySQLToCsharp/blob/master/.circleci/config.yml :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.