Skip to content

An attempt at building a cross platform executable with dotnet #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
root = true
# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
insert_final_newline = true
# Set default charset
charset = utf-8
trim_trailing_whitespace = true

# 4 space indentation
[*.{py,cs,csproj,yml,xml}]
indent_style = space
indent_size = 4
74 changes: 74 additions & 0 deletions .github/workflows/build_packages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build release archives

on: [push, pull_request]
# on:
# push:
# branches: [ $default-branch ]
# pull_request:
# branches: [ $default-branch ]

jobs:

build:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x

# Execute all unit tests in the solution
- name: Execute unit tests
run: dotnet test --runtime linux-x64

- name: Build windows x64 version
run: dotnet publish -c Release -r win10-x64

- name: Build linux x64 version
run: dotnet publish -c Release -r linux-x64

- name: Build macos x64 version
run: dotnet publish -c Release -r osx.10.15-x64

- name: Add executables to windows x64 version package
uses: actions/upload-artifact@v2
with:
name: win10-x64
path: src/Ccdc.CommitHooks.CommitHookExe/bin/Release/net5.0/win10-x64/publish/*

- name: Add common scripts to windows x64 version package
uses: actions/upload-artifact@v2
with:
name: win10-x64
path: main/*

- name: Add executables to linux x64 version package
uses: actions/upload-artifact@v2
with:
name: linux-x64
path: src/Ccdc.CommitHooks.CommitHookExe/bin/Release/net5.0/linux-x64/publish/*

- name: Add common scripts to linux x64 version package
uses: actions/upload-artifact@v2
with:
name: linux-x64
path: main/*

- name: Add executables to macos x64 version package
uses: actions/upload-artifact@v2
with:
name: macos-x64
path: src/Ccdc.CommitHooks.CommitHookExe/bin/Release/net5.0/osx.10.15-x64/publish/*

- name: Add common scripts to macos x64 version package
uses: actions/upload-artifact@v2
with:
name: macos-x64
path: main/*
Loading