Skip to content

Commit 8357c92

Browse files
authored
Merge pull request #28 from cwensley/ci-build
Updates and GitHub Actions build
2 parents c34d79b + 5df0611 commit 8357c92

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1602
-1453
lines changed

.editorconfig

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# use tabs by default for everything
7+
[*.cs]
8+
indent_style = tab
9+
indent_size = 4
10+
tab_size = 4
11+
charset=utf-8
12+
csharp_new_line_before_open_brace = all
13+
14+
# packages.config uses spaces
15+
[**\packages.config]
16+
indent_style = space
17+
indent_size = 2
18+
19+
[*.{csproj,vbproj,proj,targets,props}]
20+
indent_style = space
21+
indent_size = 2
22+
tab_size = 2
23+
24+
[*.yml]
25+
intent_style = space
26+
indent_size = 2

.github/workflows/build.yml

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags: [ '*' ]
7+
pull_request:
8+
branches: [ main ]
9+
10+
env:
11+
DotNetVersion: "5.0.x"
12+
BuildConfiguration: "Release"
13+
BuildParameters: "Source/PabloDraw/PabloDraw.csproj /clp:NoSummary /p:Configuration=Release /p:BuildVersion=${{ github.run_id }} /p:BuildBranch=${{ github.ref }}"
14+
15+
jobs:
16+
build-windows:
17+
18+
runs-on: windows-latest
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- uses: actions/setup-dotnet@v1
24+
with:
25+
dotnet-version: ${{ env.DotNetVersion }}
26+
27+
- run: dotnet publish ${{ env.BuildParameters }} -f net5.0-windows -r win-x64
28+
29+
- uses: actions/upload-artifact@v2
30+
with:
31+
name: pablodraw-windows
32+
path: artifacts/bin/${{ env.BuildConfiguration }}/net5.0-windows/win-x64/publish/*
33+
34+
build-linux:
35+
36+
runs-on: ubuntu-latest
37+
38+
steps:
39+
- uses: actions/checkout@v2
40+
41+
- uses: actions/setup-dotnet@v1
42+
with:
43+
dotnet-version: ${{ env.DotNetVersion }}
44+
45+
- run: dotnet publish ${{ env.BuildParameters }} -f net5.0 -r linux-x64
46+
47+
- uses: actions/upload-artifact@v2
48+
with:
49+
name: pablodraw-linux
50+
path: artifacts/bin/${{ env.BuildConfiguration }}/net5.0/linux-x64/publish/*
51+
52+
build-mac:
53+
54+
runs-on: macos-latest
55+
56+
steps:
57+
- uses: actions/checkout@v2
58+
59+
- uses: actions/setup-dotnet@v1
60+
with:
61+
dotnet-version: ${{ env.DotNetVersion }}
62+
63+
- uses: maxim-lobanov/setup-xamarin@v1
64+
with:
65+
mono-version: latest
66+
xamarin-mac-version: latest
67+
xcode-version: latest
68+
69+
# - name: Import code signing certificate
70+
# if: github.event_name != 'pull_request'
71+
# uses: apple-actions/import-codesign-certs@v1
72+
# with:
73+
# p12-file-base64: ${{ secrets.DEVID_CERTIFICATE_P12 }}
74+
# p12-password: ${{ secrets.DEVID_CERTIFICATE_P12_PASSWORD }}
75+
76+
# - name: Enable code signing
77+
# if: github.event_name != 'pull_request'
78+
# run: echo "BuildParameters=${{ env.BuildParameters }} /p:EnableCodeSignBuild=True" >> $GITHUB_ENV
79+
80+
# - name: Set notarization credentials
81+
# if: startsWith(github.ref, 'refs/tags/')
82+
# run: |
83+
# xcrun altool --store-password-in-keychain-item "AC_PASSWORD" -u "${{ secrets.AC_USERNAME }}" -p "${{ secrets.AC_PASSWORD }}"
84+
# echo "BuildParameters=${{ env.BuildParameters }} /p:EnableNotarizationBuild=True" >> $GITHUB_ENV
85+
86+
- run: dotnet build ${{ env.BuildParameters }} -f net5.0 -r osx-x64
87+
88+
- uses: actions/upload-artifact@v2
89+
with:
90+
name: pablodraw-mac
91+
path: artifacts/bin/${{ env.BuildConfiguration }}/net5.0/osx-x64/PabloDraw.dmg
92+
93+
update-release:
94+
needs: [ build-windows, build-mac ]
95+
runs-on: ubuntu-latest
96+
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/'))
97+
steps:
98+
- id: get_version
99+
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
100+
101+
- id: get_release
102+
uses: bruceadams/[email protected]
103+
env:
104+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105+
106+
- uses: actions/download-artifact@v2
107+
with:
108+
name: pablodraw
109+
110+
# - uses: actions/upload-release-asset@v1
111+
# env:
112+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
113+
# with:
114+
# upload_url: ${{ steps.get_release.outputs.upload_url }}
115+
# asset_path:
116+
# asset_name:
117+
# asset_content_type: application/octet-stream

.vscode/launch.json

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "PabloDraw",
9+
"type": "coreclr",
10+
"request": "launch",
11+
"preLaunchTask": "build-pablodraw",
12+
"osx": {
13+
"program": "${workspaceFolder}/artifacts/bin/${config:var.BuildConfiguration}/net5.0/osx-x64/PabloDraw.app/Contents/MacOS/PabloDraw",
14+
},
15+
"windows": {
16+
"program": "${workspaceFolder}/artifacts/bin/${config:var.BuildConfiguration}/net5.0-windows/win-x64/PabloDraw.exe",
17+
},
18+
"linux": {
19+
"program": "${workspaceFolder}/artifacts/bin/${config:var.BuildConfiguration}/net5.0/linux-x64/PabloDraw",
20+
},
21+
"args": [],
22+
"cwd": "${workspaceFolder}",
23+
"stopAtEntry": false,
24+
"console": "internalConsole"
25+
}
26+
]
27+
}

.vscode/settings.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"vssolution.altSolutionFolders": [
3+
"Source"
4+
],
5+
"var": {
6+
"BuildConfiguration": "Debug"
7+
}
8+
}

.vscode/tasks.json

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
// See https://go.microsoft.com/fwlink/?LinkId=733558
3+
// for the documentation about the tasks.json format
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"label": "build",
8+
"command": "dotnet",
9+
"type": "shell",
10+
"args": [
11+
"build",
12+
"${workspaceFolder}/Source/Pablo Desktop.sln",
13+
"/p:Configuration=Debug",
14+
"/p:Platform=Mac",
15+
"/p:GenerateFullPaths=true",
16+
"/consoleloggerparameters:NoSummary"
17+
],
18+
"group": "build",
19+
"presentation": {
20+
"clear": true
21+
},
22+
"problemMatcher": "$msCompile"
23+
},
24+
{
25+
"label": "build-pablodraw",
26+
"command": "dotnet",
27+
"type": "shell",
28+
"args": [
29+
"build",
30+
"${workspaceFolder}/Source/PabloDraw/PabloDraw.csproj",
31+
// "/p:BuildTarget=Linux",
32+
"/p:Configuration=${config:var.BuildConfiguration}",
33+
"/p:GenerateFullPaths=true",
34+
"/consoleloggerparameters:NoSummary"
35+
],
36+
"group": "build",
37+
"presentation": {
38+
"clear": true
39+
},
40+
"problemMatcher": "$msCompile"
41+
},
42+
{
43+
"label": "publish-pablodraw",
44+
"command": "dotnet",
45+
"type": "shell",
46+
"args": [
47+
"publish",
48+
"${workspaceFolder}/Source/PabloDraw/PabloDraw.csproj",
49+
// "/p:BuildTarget=Linux",
50+
"/p:Configuration=Release",
51+
"/p:GenerateFullPaths=true",
52+
"/consoleloggerparameters:NoSummary"
53+
],
54+
"group": "build",
55+
"presentation": {
56+
"clear": true
57+
},
58+
"problemMatcher": "$msCompile"
59+
},
60+
{
61+
"label": "run-published",
62+
"type": "shell",
63+
"osx": {
64+
"command": "${workspaceFolder}/artifacts/bin/Release/net5.0/osx-x64/PabloDraw.app/Contents/MacOS/PabloDraw",
65+
},
66+
"windows": {
67+
"command": "${workspaceFolder}/artifacts/bin/Release/net5.0-windows/win-x64/publish/PabloDraw.exe",
68+
},
69+
"linux": {
70+
"command": "${workspaceFolder}/artifacts/bin/Release/net5.0/linux-x64/publish/PabloDraw",
71+
},
72+
"problemMatcher": [ ]
73+
}
74+
]
75+
}

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2017 Curtis Wensley
3+
Copyright (c) 2021 Curtis Wensley
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Libraries/Mono.Nat

Submodule Mono.Nat deleted from b20141c

Libraries/extractprojects.sh

-82
This file was deleted.

Libraries/lidgren

Submodule lidgren deleted from da7b4b8

Source/Directory.Build.props

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,22 @@
11
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
22
<PropertyGroup>
33
<Company>Picoe Software Solutions</Company>
4-
<Copyright>(c) 2006-2019 by Curtis Wensley aka Eto</Copyright>
4+
<Copyright>(c) 2006-2021 by Curtis Wensley aka Eto</Copyright>
55
<Version>3.3.0-dev</Version>
66

77
<BasePath>$(MSBuildThisFileDirectory)..\</BasePath>
8-
<ArtifactsDir>$(BasePath)Artifacts\</ArtifactsDir>
8+
<ArtifactsDir>$(BasePath)artifacts\</ArtifactsDir>
9+
10+
<DebugType>embedded</DebugType>
911

1012
<BaseIntermediateOutputPath Condition="$(BaseIntermediateOutputPath) == ''">$(ArtifactsDir)obj\$(OS)\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
1113
<OutputArtifactName Condition="$(OutputArtifactName) == ''">bin</OutputArtifactName>
1214
<BaseOutputPath Condition="$(BaseOutputPath) == ''">$(ArtifactsDir)$(OutputArtifactName)\</BaseOutputPath>
1315
<PackageOutputPath Condition="$(PackageOutputPath) == ''">$(ArtifactsDir)nuget\$(Configuration)\</PackageOutputPath>
1416
<RestoreProjectStyle Condition="'$(RestoreProjectStyle)' == ''">PackageReference</RestoreProjectStyle>
1517

18+
<!-- Uncomment to use Eto from source -->
19+
<!-- <EtoBasePath>..\..\..\Eto\</EtoBasePath> -->
20+
1621
</PropertyGroup>
1722
</Project>

Source/Directory.Build.targets

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<Import Project="EmbedReferences.targets" />
44

5-
<UsingTask TaskName="_ParseVersion" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
5+
<UsingTask TaskName="_ParseVersion" TaskFactory="RoslynCodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
66
<ParameterGroup>
77
<Version ParameterType="System.String" Required="true" />
88
<AssemblyVersion ParameterType="System.String" Output="true" />

0 commit comments

Comments
 (0)