Skip to content
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

GitHub runner #17

Merged
merged 104 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from 89 commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
aa062fb
Create main.yml
prasenjeetnath Oct 16, 2023
21ca538
Update main.yml
prasenjeetnath Oct 16, 2023
c2940eb
Update main.yml
prasenjeetnath Oct 16, 2023
6321d6f
Update main.yml
prasenjeetnath Oct 16, 2023
3e92d6a
Add files via upload
prasenjeetnath Oct 16, 2023
af83366
Add files via upload
prasenjeetnath Oct 16, 2023
6e99af6
Update main.yml
prasenjeetnath Oct 16, 2023
62f37a2
Update and rename SourceGrid.nuspec to CA.nuspec
prasenjeetnath Oct 16, 2023
69ef042
Update main.yml
prasenjeetnath Oct 16, 2023
1294bed
Update and rename CA.nuspec to SourceGrid.nuspec
prasenjeetnath Oct 16, 2023
8d63788
Update main.yml
prasenjeetnath Oct 16, 2023
2aa90b9
Update SourceGrid.nuspec
prasenjeetnath Oct 16, 2023
bf0edba
Update main.yml
prasenjeetnath Oct 16, 2023
66455e2
Update SourceGrid.nuspec
prasenjeetnath Oct 16, 2023
a953b47
Update SourceGrid.nuspec
prasenjeetnath Oct 16, 2023
08a5a8d
Update main.yml
prasenjeetnath Oct 16, 2023
07600e1
Update main.yml
prasenjeetnath Oct 16, 2023
7741928
Update main.yml
prasenjeetnath Oct 16, 2023
c4a6e4c
Update main.yml
prasenjeetnath Oct 16, 2023
c2137a5
Update main.yml
prasenjeetnath Oct 17, 2023
71ae11e
Update main.yml
prasenjeetnath Oct 17, 2023
37e036c
Update main.yml
prasenjeetnath Oct 17, 2023
6aaf821
Update main.yml
prasenjeetnath Oct 17, 2023
4048ac0
Update main.yml
prasenjeetnath Oct 17, 2023
7a5da54
Update main.yml
prasenjeetnath Oct 17, 2023
213157b
Update main.yml
prasenjeetnath Oct 17, 2023
14d3b73
Update main.yml
prasenjeetnath Oct 17, 2023
a984d73
Update main.yml
prasenjeetnath Oct 17, 2023
5f0a276
Update main.yml
prasenjeetnath Oct 17, 2023
aa485b1
Update main.yml
prasenjeetnath Oct 17, 2023
9d657e4
Update main.yml
prasenjeetnath Oct 17, 2023
b1252cc
Update main.yml
prasenjeetnath Oct 17, 2023
ed19cf6
Update main.yml
prasenjeetnath Oct 17, 2023
28bc23e
Update main.yml
prasenjeetnath Oct 17, 2023
80e7800
Update main.yml
prasenjeetnath Oct 17, 2023
f50bb5d
Update main.yml
prasenjeetnath Oct 17, 2023
667e8f1
Update main.yml
prasenjeetnath Oct 17, 2023
03799f9
Create release.yml
prasenjeetnath Oct 17, 2023
e1716ee
Update main.yml
prasenjeetnath Oct 17, 2023
455dccb
Update release.yml
prasenjeetnath Oct 17, 2023
ed1405e
Update release.yml
prasenjeetnath Oct 17, 2023
32e51d9
Update release.yml
prasenjeetnath Oct 17, 2023
ee054d5
Update release.yml
prasenjeetnath Oct 17, 2023
9d7a521
Update main.yml
prasenjeetnath Oct 18, 2023
9d198f5
Add files via upload
prasenjeetnath Oct 18, 2023
8a94ca8
Update main.yml
prasenjeetnath Oct 18, 2023
1ead697
Merge pull request #13 from siemens/master
prasenjeetnath Oct 18, 2023
55c0912
Delete .nuget/Siemens.Simulation.SourceGrid.nuspec
prasenjeetnath Oct 18, 2023
868eb20
Delete SourceGrid.nuspec
prasenjeetnath Oct 18, 2023
c0ba6a9
Update main.yml
prasenjeetnath Oct 18, 2023
dbd4bac
Update main.yml
prasenjeetnath Oct 18, 2023
54a410d
Update main.yml
prasenjeetnath Oct 18, 2023
8c15f1c
Update main.yml
prasenjeetnath Oct 18, 2023
82a7435
Update main.yml
prasenjeetnath Oct 18, 2023
9afd6e6
Update main.yml
prasenjeetnath Oct 18, 2023
d8dbf77
Update main.yml
prasenjeetnath Oct 18, 2023
79f2819
Update main.yml
prasenjeetnath Oct 18, 2023
37f4b93
Update GitVersion.yml
prasenjeetnath Oct 18, 2023
7929a40
Update main.yml
prasenjeetnath Oct 18, 2023
2966538
Update main.yml
prasenjeetnath Oct 18, 2023
7337439
Update main.yml
prasenjeetnath Oct 18, 2023
0658852
Update main.yml
prasenjeetnath Oct 18, 2023
d77dc6a
Update main.yml
prasenjeetnath Oct 18, 2023
279345a
Update main.yml
prasenjeetnath Oct 18, 2023
ea55766
Update GitVersion.yml
prasenjeetnath Oct 18, 2023
620af8a
Update main.yml
prasenjeetnath Oct 18, 2023
9894120
Update main.yml
prasenjeetnath Oct 18, 2023
7d82cce
Update main.yml
prasenjeetnath Oct 18, 2023
5ea7b5c
Update main.yml
prasenjeetnath Oct 18, 2023
ce34a1c
Update main.yml
prasenjeetnath Oct 18, 2023
8beb678
Update main.yml
prasenjeetnath Oct 18, 2023
52076b8
Update main.yml
prasenjeetnath Oct 18, 2023
4fbddd6
Update main.yml
prasenjeetnath Oct 18, 2023
63569a6
Update main.yml
prasenjeetnath Oct 18, 2023
0b4cfec
Update main.yml
prasenjeetnath Oct 18, 2023
42fa86a
Update main.yml
prasenjeetnath Oct 18, 2023
26a36ea
Update main.yml
prasenjeetnath Oct 18, 2023
404a19a
Update main.yml
prasenjeetnath Oct 18, 2023
56b9061
Update main.yml
prasenjeetnath Oct 18, 2023
cc504a0
Update main.yml
prasenjeetnath Oct 19, 2023
3fbd3fd
Update main.yml
prasenjeetnath Oct 19, 2023
e625ad8
Update main.yml
prasenjeetnath Oct 19, 2023
c70671b
Update main.yml
prasenjeetnath Oct 19, 2023
489ef79
Update main.yml
prasenjeetnath Oct 19, 2023
957cbb4
Update main.yml
prasenjeetnath Oct 19, 2023
968a259
Update main.yml
prasenjeetnath Oct 19, 2023
aeb5edd
Update main.yml
prasenjeetnath Oct 19, 2023
fcc2f5a
Update main.yml
prasenjeetnath Oct 19, 2023
deae6cf
Update main.yml
prasenjeetnath Nov 15, 2023
09c1771
Update GitVersion.yml
prasenjeetnath Nov 17, 2023
70b497f
Update main.yml
prasenjeetnath Nov 17, 2023
54b7b44
Update GitVersion.yml
prasenjeetnath Nov 17, 2023
d3ca36d
Update main.yml
prasenjeetnath Nov 17, 2023
4230408
Update GitVersion.yml
prasenjeetnath Nov 17, 2023
c1c1d18
Update main.yml
prasenjeetnath Nov 17, 2023
6d21eb0
Update main.yml
prasenjeetnath Nov 17, 2023
b5761ef
Update main.yml
prasenjeetnath Nov 17, 2023
9abd64a
Update main.yml
prasenjeetnath Nov 17, 2023
05bf1ae
Update main.yml
prasenjeetnath Nov 17, 2023
0ae2ca5
Update main.yml
prasenjeetnath Nov 17, 2023
90e2e8f
Update main.yml
prasenjeetnath Nov 17, 2023
7d937e5
Update main.yml
prasenjeetnath Nov 17, 2023
3b2abdd
Update main.yml
prasenjeetnath Nov 17, 2023
6903f88
Update GitVersion.yml
prasenjeetnath Nov 21, 2023
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
171 changes: 171 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
name: Build on Github servers

on:
push:
pull_request:

jobs:

build:
runs-on: windows-latest

defaults:
run:
working-directory: .
outputs:
semver: ${{ steps.gitversion.outputs.semver }}
sourcegrid: ${{ steps.packageBuildResults.outputs.sourcegrid }}
nupkg-sourceGrid: ${{ steps.createNupkg.outputs.nupkg-sourcegrid }}


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

- uses: actions/setup-dotnet@v3
with:
dotnet-version: '3.1.x'

- name: Setup Version
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.3.6'
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: TRUE

- name: Determine Version
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: TRUE

- name: get SemVer
id: gitversion
run: |
echo "SemVer: v$($env:GitVersion_SemVer)"
Write-Host "::set-output name=semver::v$($env:GitVersion_SemVer)"
$fileName = "dummy-v$($env:GitVersion_SemVer)"
echo "SemVerMMP: v$($env:GitVersion_MajorMinorPatch)"
Write-Host "Filename: '$fileName'"


- name: Setup msbuild
uses: microsoft/[email protected]
with:
vs-version: '12.0'


- name: Restore Packages
run: Nuget restore SourceGrid.sln

- name: Build
run: msbuild -m -t:Rebuild /p:Configuration=Release /p:Platform="Any CPU" /fl SourceGrid.sln


- name: Archive Build Log
uses: actions/upload-artifact@v2
if: ${{ success() || failure() }}
with:
name: Compile_Solution_log
path: |
*.log



- name: Create zip
id: packageBuildResults
run: |
$sourceFolder = Join-Path $env:GITHUB_WORKSPACE "out" | Join-Path -ChildPath "net*"
$outFolder = Join-Path $env:GITHUB_WORKSPACE "out" | Join-Path -ChildPath "sourcegrid"
New-Item -ItemType Directory -Force -Path $outFolder
$fileName = "sourcegrid-2.0.0.zip"
RenishPalliyath marked this conversation as resolved.
Show resolved Hide resolved
Write-Host "Filename: '$fileName'"
Write-Host "sourceFolder: '$sourceFolder'"
Write-Host "Outfolder: '$outFolder'"
Write-Host "::set-output name=sourcegrid::$($fileName)"
Remove-Item $sourceFolder\**\*.pdb -Force -Recurse
RenishPalliyath marked this conversation as resolved.
Show resolved Hide resolved
$outPath = Join-Path $outFolder $fileName
Compress-Archive -DestinationPath $outPath -Path $sourceFolder -CompressionLevel Optimal


- name: Archive Build Output
uses: actions/upload-artifact@v2
with:
name: sourcegrid
path: |
out/sourcegrid


- name: Create Nuget Packages
id: createNupkg
run: |
nuget pack .nuget\SourceGrid.nuspec -Version 2.0.0
RenishPalliyath marked this conversation as resolved.
Show resolved Hide resolved
Write-Host "::set-output name=nupkg-sourcegrid::sourcegrid.2.0.0.nupkg"

- name: Archive NuGet Packages
uses: actions/upload-artifact@v2
with:
name: nuget-sourceGrid
path: |
*.nupkg

release:
if: github.ref == 'refs/heads/Github_runner'
runs-on: windows-latest
needs: build

steps:
- name: Download Build Output
uses: actions/download-artifact@v2
with:
name: sourcegrid

- name: Download NuGet Package
uses: actions/download-artifact@v2
with:
name: nuget-sourceGrid

RenishPalliyath marked this conversation as resolved.
Show resolved Hide resolved
- name: Debug
run: |
tree

- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v2.0.0
RenishPalliyath marked this conversation as resolved.
Show resolved Hide resolved
#tag_name: ${{ needs.build.outputs.semver }}
release_name: Release v2.0.0
body: |
${{ github.event.head_commit.message }}
RenishPalliyath marked this conversation as resolved.
Show resolved Hide resolved
draft: true
prerelease: false

- name: Upload Zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ needs.build.outputs.sourcegrid }}
asset_name: ${{ needs.build.outputs.sourcegrid }}
asset_content_type: application/zip


- name: Upload Nupkg
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./${{ needs.build.outputs.nupkg-sourceGrid }}
asset_name: ${{ needs.build.outputs.nupkg-sourceGrid }}
asset_content_type: application/zip



40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish NuGet Packages

on:
release:
types: [published]

permissions:
packages: write
contents: read

jobs:
build:
runs-on: windows-latest

defaults:
run:
working-directory: .

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

- name: Download NuGet Packages from Release
run: |
Write-Host "GITHUB_REF: '$($env:GITHUB_REF)'"
$prefix = "refs/tags/"
$name = $($env:GITHUB_REF).Substring($prefix.Length)
Write-Host "name: '$name'"
gh release download $name --repo siemens/sourcegrid --pattern '*.nupkg' --clobber
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to github packages
run: |
dotnet nuget push "*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source "https://api.nuget.org/v3/index.json"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

5 changes: 5 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
mode: Mainline
next-version: 3.1.0
branches:
master:
regex: ^master$|^main$
RenishPalliyath marked this conversation as resolved.
Show resolved Hide resolved
Loading