Skip to content

Commit 5bb8cfa

Browse files
committed
fix: added pipelines
1 parent 0745fdf commit 5bb8cfa

File tree

7 files changed

+193
-1
lines changed

7 files changed

+193
-1
lines changed

.config/dotnet-tools.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"version": 1,
3+
"isRoot": true,
4+
"tools": {
5+
"EarthML.Extensions.Mapbox": {
6+
"version": "1.0.0",
7+
"commands": [
8+
"earthml-mapbox"
9+
]
10+
}
11+
}
12+
}

.github/workflows/.releaserc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
branches:
2+
- name: main
3+
- name: dev
4+
prerelease: dev
5+
6+
plugins:
7+
- - "@semantic-release/commit-analyzer"
8+
- preset: conventionalcommits
9+
10+
- - "@semantic-release/release-notes-generator"
11+
- preset: conventionalcommits
12+
13+
- - "@semantic-release/github"
14+
- assets:
15+
- path: ../../artifacts/*.nupkg
16+
label: Tool
17+
18+
- - "@semantic-release/exec"
19+
- publishCmd: "dotnet nuget push ..\\..\\artifacts\\*.nupkg --source https://nuget.pkg.github.com/earthml/index.json --api-key ${process.env.GITHUB_TOKEN}"
20+
21+
- - "@semantic-release/exec"
22+
- publishCmd: "dotnet nuget push ..\\..\\artifacts\\*.nupkg --source https://api.nuget.org/v3/index.json --api-key ${process.env.CI_NUGET_API_KEY}"

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
2+
on:
3+
pull_request:
4+
types: [ assigned, opened, synchronize, reopened ]
5+
push:
6+
branches:
7+
- 'feature/**'
8+
9+
jobs:
10+
build:
11+
runs-on: windows-latest
12+
name: Building
13+
steps:
14+
- name: Checkout code base
15+
uses: actions/checkout@v2
16+
17+
- uses: actions/setup-dotnet@v1
18+
with:
19+
dotnet-version: '6.0.x'
20+
21+
- name: Cleaning
22+
run: dotnet clean
23+
24+
- name: Restore NuGet packages
25+
run: dotnet restore EarthML.Extensions.Mapbox.sln
26+
27+
- name: Build solution
28+
run: dotnet build -o ../build/ -c Release --no-restore -m:1
29+
30+
- name: Archive build to artifacts
31+
uses: actions/upload-artifact@v2
32+
with:
33+
name: build
34+
path: |
35+
build/*
36+
retention-days: 5

.github/workflows/release.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- dev
7+
- main
8+
9+
jobs:
10+
release:
11+
name: Releasing
12+
runs-on: windows-latest
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v2
16+
17+
- uses: actions/setup-dotnet@v1
18+
with:
19+
dotnet-version: '6.0.x'
20+
21+
- uses: actions/setup-node@v2
22+
with:
23+
node-version: '16'
24+
25+
- name: Add plugin for conventional commits
26+
run: npm install conventional-changelog-conventionalcommits
27+
working-directory: ./.github/workflows
28+
29+
- name: Add plugin for executing bash commands
30+
run: npm install @semantic-release/exec -D
31+
working-directory: ./.github/workflows
32+
33+
- name: Dry Run Semantic to get next Version nummber
34+
working-directory: ./.github/workflows
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
GIT_AUTHOR_NAME: pksorensen
38+
GIT_AUTHOR_EMAIL: [email protected]
39+
run: |
40+
echo "RELEASE_VERSION=$((npx semantic-release --dry-run).Where({ $_ -like '*Release note*' }) | Out-String | Select-String '[0-9]+\.[0-9]+\.[0-9]+([-][a-zA-z]+[.][0-9]*)?' | % { $_.Matches } | % { $_.Value })" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
41+
- name: Print release verison
42+
run: echo ${env:RELEASE_VERSION}
43+
44+
- name: Cleaning
45+
run: dotnet clean --configuration Release
46+
47+
- name: Restore NuGet packages
48+
run: dotnet restore EAVFW.Extensions.Manifest.ManifestEnricherTool.sln
49+
50+
- name: Package Parser
51+
run: dotnet pack -c Release -p:PackageVersion=${env:RELEASE_VERSION} -o ./artifacts
52+
if: ${{ env.RELEASE_VERSION }}
53+
54+
- name: Release to GitHub and NuGet
55+
working-directory: .\\.github\\workflows
56+
env:
57+
CI_NUGET_API_KEY: ${{ secrets.CI_NUGET_API_KEY }}
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
GIT_AUTHOR_NAME: pksorensen
60+
GIT_AUTHOR_EMAIL: [email protected]
61+
run: npx semantic-release

.github/workflows/todo.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Create issues from todo"
2+
3+
on:
4+
push:
5+
branches:
6+
- 'dev'
7+
- 'main'
8+
- 'feature/**'
9+
10+
jobs:
11+
build:
12+
runs-on: "ubuntu-latest"
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v2
16+
- name: "TODO to Issue"
17+
uses: "alstr/[email protected]"
18+
id: "todo"
19+
with:
20+
TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
COMMENT_MARKER: "//"
22+
LABEL: "// TODO"

EarthML.Extensions.Mapbox.sln

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@ VisualStudioVersion = 17.2.32630.192
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EarthML.Extensions.Mapbox.UploadCLI", "apps\EarthML.Extensions.Mapbox.UploadCLI\EarthML.Extensions.Mapbox.UploadCLI.csproj", "{5FC3DF42-441D-44F1-BFE5-E302DFE39AF9}"
77
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{BB03D4ED-8E1E-4861-B2B5-9E673957722B}"
9+
ProjectSection(SolutionItems) = preProject
10+
README.md = README.md
11+
EndProjectSection
12+
EndProject
13+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{0F294A29-58A3-4BCB-A91F-A4DD11F861C5}"
14+
ProjectSection(SolutionItems) = preProject
15+
.config\dotnet-tools.json = .config\dotnet-tools.json
16+
EndProjectSection
17+
EndProject
18+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{A1EC932B-619E-4F32-A18C-14417E1CEA60}"
19+
EndProject
20+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{75B80F35-A350-44F1-9016-BDEB17AA2CBC}"
21+
ProjectSection(SolutionItems) = preProject
22+
.github\workflows\.releaserc = .github\workflows\.releaserc
23+
.github\workflows\build.yml = .github\workflows\build.yml
24+
.github\workflows\release.yml = .github\workflows\release.yml
25+
.github\workflows\todo.yml = .github\workflows\todo.yml
26+
EndProjectSection
27+
EndProject
828
Global
929
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1030
Debug|Any CPU = Debug|Any CPU
@@ -19,6 +39,9 @@ Global
1939
GlobalSection(SolutionProperties) = preSolution
2040
HideSolutionNode = FALSE
2141
EndGlobalSection
42+
GlobalSection(NestedProjects) = preSolution
43+
{75B80F35-A350-44F1-9016-BDEB17AA2CBC} = {A1EC932B-619E-4F32-A18C-14417E1CEA60}
44+
EndGlobalSection
2245
GlobalSection(ExtensibilityGlobals) = postSolution
2346
SolutionGuid = {6E59EA6E-ED92-495A-BE12-243B225B5267}
2447
EndGlobalSection

apps/EarthML.Extensions.Mapbox.UploadCLI/EarthML.Extensions.Mapbox.UploadCLI.csproj

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,24 @@
66
<ImplicitUsings>disable</ImplicitUsings>
77
<Nullable>disable</Nullable>
88
<UserSecretsId>6ae02921-9672-4afd-9727-0029aeaa7204</UserSecretsId>
9+
10+
<PackAsTool>true</PackAsTool>
11+
<ToolCommandName>earthml-mapbox</ToolCommandName>
12+
13+
<PackageOutputPath>./../../artifacts</PackageOutputPath>
14+
15+
<Title>EarthML.Extensions.Mapbox.UploadCLI</Title>
16+
<Authors>Poul Kjeldager</Authors>
17+
<Description>A tool for uploading to mapbox for dotnet devs</Description>
18+
<PackageReadmeFile>README.md</PackageReadmeFile>
19+
<RepositoryUrl>https://github.com/EAVFW/EAVFW.Extensions.Manifest.ManifestEnricherTool</RepositoryUrl>
20+
921
</PropertyGroup>
10-
22+
23+
<ItemGroup>
24+
<None Include="..\..\README.md" Link="README.md" Pack="true" PackagePath="\" />
25+
</ItemGroup>
26+
1127

1228
<ItemGroup>
1329
<PackageReference Include="AWSSDK.S3" Version="3.7.9.43" />

0 commit comments

Comments
 (0)