Skip to content

Commit

Permalink
chore: setup check and release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
oguzhankiyar committed Jan 8, 2024
1 parent 05e4742 commit 723ce97
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build & Test

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-20.04
name: Build & Test

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup
uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.x'

- name: Build
env:
SOLUTIONFILE: FiltexNet.sln
VERSION: 1.0.0
run: |
bash ./scripts/build.sh
- name: Test
env:
SOLUTIONFILE: FiltexNet.sln
run: |
bash ./scripts/test.sh
58 changes: 58 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Build & Release

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-20.04
name: Build & Release
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Setup
uses: actions/setup-dotnet@v3
with:
dotnet-version: '5.0.x'

- name: Get version
id: vars
run: |
bash ./scripts/version.sh
echo "version=$(cat version.txt)" >> $GITHUB_OUTPUT
- name: Build
env:
SOLUTIONFILE: FiltexNet.sln
VERSION: ${{ steps.vars.outputs.version }}
run: |
bash ./scripts/build.sh
- name: Test
env:
SOLUTIONFILE: FiltexNet.sln
run: |
bash ./scripts/test.sh
- name: Create release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: "v${{ steps.vars.outputs.version }}"
release_name: "v${{ steps.vars.outputs.version }}"
draft: false
prerelease: false

- name: Pack
env:
NUGET_SOURCE: https://api.nuget.org/v3/index.json
NUGET_KEY: ${{ secrets.NUGET_API_KEY }}
VERSION: ${{ steps.vars.outputs.version }}
run: |
bash ./scripts/pack.sh

0 comments on commit 723ce97

Please sign in to comment.