Skip to content

Commit

Permalink
Begin CI/CD
Browse files Browse the repository at this point in the history
  • Loading branch information
Twinki14 committed Dec 26, 2023
1 parent 1c4d649 commit 4fc23d2
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/build-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build - Publish
on:
push:

concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true

# on push anything, run the ci build without publishing
# on a tag push, publish as release
# on a main push, publish as a rerelease
# 0.2.6 - tag pushes
# 0.2.6-ci-6 - any push to main

# cleanup all ci-packages on new version tags

jobs:
build:
runs-on: ubuntu-latest
steps:

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup GitVersion
uses: gittools/actions/gitversion/setup@v0
with:
versionSpec: '5.x'
preferLatestVersion: true

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x

- name: GitVersion
id: git-version
uses: gittools/actions/gitversion/execute@v0
with:
useConfigFile: true

- name: Build
run: dotnet build --configuration Release
working-directory: ./src

- name: Pack
run: dotnet pack --configuration Release
working-directory: ./src
10 changes: 10 additions & 0 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
mode: ContinuousDelivery
branches:
main:
mode: ContinuousDeployment
tag: ci
track-merge-target: true
ignore:
sha: []
merge-message-formats: {}
tag-prefix: "v"

0 comments on commit 4fc23d2

Please sign in to comment.