Skip to content

Commit

Permalink
Adding release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
safalin1 committed Dec 27, 2023
1 parent 034696e commit 6d92a3b
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,4 @@ jobs:
with:
name: Package
path: Tsukuru.NetCore\bin\Release\net8.0-windows\publish\

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

on:
push:
tags:
- "v*"

jobs:

build:
runs-on: windows-latest

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

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

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/[email protected]

- name: Execute build
run: dotnet build

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

- name: Publish desktop app
run: dotnet publish Tsukuru.NetCore/Tsukuru.csproj

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: Package
path: Tsukuru.NetCore\bin\Release\net8.0-windows\publish\

- name: Zip artifact
uses: montudor/action-zip@v1
with:
args: zip -qq -r Tsukuru.zip Tsukuru.NetCore\bin\Release\net8.0-windows\publish\

- name: Create release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
draft: true
files: |
Tsukuru.zip
1 change: 1 addition & 0 deletions Tsukuru.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Misc", "Misc", "{58AE92B2-B
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
.github\workflows\ci.yml = .github\workflows\ci.yml
.github\workflows\release.yml = .github\workflows\release.yml
EndProjectSection
EndProject
Global
Expand Down

0 comments on commit 6d92a3b

Please sign in to comment.