Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
soenneker committed Mar 25, 2024
1 parent 6635fef commit 0370ddf
Show file tree
Hide file tree
Showing 15 changed files with 845 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"automerge": true,
"prHourlyLimit": 0,
"autoApprove": true
}
24 changes: 24 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: automerge
on: pull_request

permissions:
contents: write
pull-requests: write

env:
GH_TOKEN: ${{ secrets.RENOVATEBOT }}

jobs:
automerge:
runs-on: ubuntu-latest
if: ${{ github.actor == 'renovate[bot]' }}
steps:
- name: Enable auto-merge for Renovate PRs
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}

- name: Approve patch and minor updates
run: gh pr review $PR_URL --approve
env:
PR_URL: ${{github.event.pull_request.html_url}}
33 changes: 33 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: build-and-test
on:
# Testing - run for any PRs.
pull_request:
branches:
- main

env:
"PipelineEnvironment": true

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

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

- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test test/Soenneker.Extensions.DateTime.Quarter.Tests.csproj --no-restore --verbosity normal

- name: Pack
run: dotnet pack --no-build --configuration Release --output .
45 changes: 45 additions & 0 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: publish-package
on:
push:
branches:
- main

# Publish `v1.2.3` tags as releases.
tags:
- v*

env:
"PipelineEnvironment": true

jobs:
publish-package:
runs-on: ubuntu-latest

#{Services}
steps:
- uses: actions/checkout@v4

- name: Setting up build version
run: |
version=$(($GITHUB_RUN_NUMBER))
echo "BUILD_VERSION=2.1.$version" >> ${GITHUB_ENV}
- name: Setup .NET Core 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Install dependencies
run: dotnet restore

- name: Build
run: dotnet build --configuration Release --no-restore

- name: Test
run: dotnet test test/Soenneker.Extensions.DateTime.Quarter.Tests.csproj --no-restore --verbosity normal

- name: Pack
run: dotnet pack --no-build --configuration Release --output .

- name: Publish to nuGet
run: dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_TOKEN}} --skip-duplicate
Loading

0 comments on commit 0370ddf

Please sign in to comment.