Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHinsh committed Jun 29, 2024
1 parent c6fdf01 commit 238070a
Showing 1 changed file with 45 additions and 15 deletions.
60 changes: 45 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,31 +1,61 @@
name: dotnet package
name: ABBWorkItemClone Build and Release

on:
push:
workflow_dispatch:

jobs:
build:

runs-on: windows-latest
strategy:
matrix:
dotnet-version: [ '8.x']
Setup:
name: Setup
runs-on: ubuntu-latest
outputs:
GitVersion_BranchName: ${{ steps.gitversion.outputs.GitVersion_BranchName }}
GitVersion_SemVer: ${{ steps.gitversion.outputs.GitVersion_SemVer }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v1.1.1
with:
versionSpec: '5.x'
- name: Install GitVersion
id: gitversion
uses: gittools/actions/gitversion/setup@v1.1.1
with:
versionSpec: '5.x'
useConfigFile: true

build:
runs-on: ubuntu-latest
needs: Setup
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
fetch-depth: 0

- name: Build ABBWorkItemClone
shell: pwsh
run: .\build.ps1
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

dotnet-version: 8.x
- run: dotnet build
- run: dotnet test
- uses: edgarrc/action-7z@v1
working-directory: ./output
with:
args: 7z a -tzip ABBWorkItemClone-v${{needs.Setup.outputs.GitVersion_SemVer}}.zip .\ABB.WorkItemClone.ConsoleUI\bin\Debug\net8.0\**
- uses: actions/upload-artifact@v4
with:
name: ABBWorkItemClone
path: .\output\*

release:
runs-on: ubuntu-latest
needs: [build, Setup]
steps:
- uses: actions/download-artifact@v4
with:
name: ABBWorkItemClone
- run: gh release create v${{needs.Setup.outputs.GitVersion_SemVer}} .\output\ABBWorkItemClone-v${{needs.Setup.outputs.GitVersion_SemVer}}.zip --generate-notes --generate-notes --discussion-category "General"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}


0 comments on commit 238070a

Please sign in to comment.