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

Project structure and offer search feature #1

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions .github/config/pr-labeler-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
feature: feature/*
fix: fix/*
chore: chore/*
26 changes: 26 additions & 0 deletions .github/config/release-drafter-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name-template: 'v$RESOLVED_VERSION'
tag-template: 'v$RESOLVED_VERSION'
categories:
- title: 'Features'
labels:
- 'feature'
- title: 'Bug Fixes'
labels:
- 'fix'
- title: 'Maintenance'
label: 'chore'
change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
change-title-escapes: '\<*_&' # You can add # and @ to disable mentions, and add ` to disable code blocks.
version-resolver:
major:
labels:
- 'major'
minor:
labels:
- 'minor'
patch:
labels:
- 'patch'
default: patch
template: |
$CHANGES
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: .NET build and test

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
env:
SOLUTION: ./Kwtc.Tjek.Client.sln

runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- uses: actions/checkout@v3

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x

- name: Restore dependencies
run: dotnet restore $SOLUTION

- name: Build
run: dotnet build $SOLUTION -c Release --no-restore

- name: Test
run: dotnet test $SOLUTION -c Release --no-build --verbosity normal
21 changes: 21 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PR labeler

on:
pull_request:
types: [opened]

permissions:
contents: read

jobs:
pr-labeler:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: TimonVS/pr-labeler-action@v4
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
configuration-path: .github/config/pr-labeler-config.yml

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

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15

permissions:
packages: write

env:
SOLUTION: ./Kwtc.Tjek.Client.sln

steps:

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

- name: Verify commit exists in origin/main
run: git branch --remote --contains | grep origin/main

- name: Extract release notes
run: |
git log --pretty=format:'%d %s' ${GITHUB_REF} | perl -pe 's| \(.*tag: v(\d+.\d+.\d+(-preview\d{3})?)(, .*?)*\)|\n## \1\n|g' > RELEASE-NOTES

- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV

- name: Build
run: dotnet build $SOLUTION -c Release /p:Version=${VERSION}

- name: Test
run: dotnet test $SOLUTION -c Release /p:Version=${VERSION} --no-build

- name: Pack
run: dotnet pack $SOLUTION -c Release /p:Version=${VERSION} --no-build --output .

- name: Push package to Github
run: dotnet nuget push **\*.nupkg --api-key ${{secrets.GITHUB_TOKEN}} --source https://nuget.pkg.github.com/kwtc/index.json
21 changes: 21 additions & 0 deletions .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Release drafter

on:
push:
branches: ["main"]

permissions:
contents: read

jobs:
release-drafter:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
with:
config-name: config/release-drafter-config.yml
disable-autolabeler: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17 changes: 17 additions & 0 deletions .github/workflows/require-pr-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Require PR version label
on:
pull_request_target:
types: [opened, labeled, unlabeled, synchronize]

jobs:
require-pr-label:
name: check
runs-on: ubuntu-latest

steps:
- uses: jesusvasquez333/verify-pr-label-action@v1.4.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
valid-labels: "major, minor, patch"
pull-request-number: "${{ github.event.pull_request.number }}"
disable-reviews: true
Loading
Loading