Merge pull request #2 from oddstr13/let-there-be-ci

Let there be CI
This commit is contained in:
Odd Stråbø 2021-03-10 23:20:10 +01:00 committed by GitHub
commit 2e90e50719
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 143 additions and 0 deletions

24
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,24 @@
version: 2
updates:
# Fetch and update latest `nuget` pkgs
- package-ecosystem: nuget
directory: /
schedule:
interval: daily
time: '00:00'
open-pull-requests-limit: 10
commit-message:
prefix: fix
prefix-development: chore
include: scope
# Fetch and update latest `github-actions` pkgs
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
time: '00:00'
open-pull-requests-limit: 10
commit-message:
prefix: chore
include: scope

9
.github/release-drafter.yml vendored Normal file
View File

@ -0,0 +1,9 @@
_extends: jellyfin-meta-plugins
template: |
<!-- Optional: add a release summary here -->
[Plugin build can be downloaded here](https://repo.jellyfin.org/releases/plugin/kitsu/kitsu_$NEXT_MAJOR_VERSION.0.0.0.zip).
## :sparkles: What's New
$CHANGES

31
.github/workflows/build-dotnet.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Test Build Plugin
on:
push:
branches: [ master ]
paths-ignore:
- '**/*.md'
pull_request:
branches: [ master ]
paths-ignore:
- '**/*.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release
- name: Test
run: dotnet test --no-restore --verbosity normal

44
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: Run CodeQL
on:
push:
branches: [ master ]
paths-ignore:
- '**/*.md'
pull_request:
branches: [ master ]
paths-ignore:
- '**/*.md'
schedule:
- cron: '24 2 * * 4'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [ 'csharp' ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v1
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View File

@ -0,0 +1,19 @@
name: Publish Drafted GitHub Release
on:
push:
tags: [ 'v*' ]
jobs:
publish_release_draft:
runs-on: ubuntu-latest
steps:
- name: Get version from GITHUB_REF
id: get-version
run: echo "::set-output name=version::${GITHUB_REF/refs\/tags\//}"
- name: Publish release on GitHub
uses: test-room-7/action-publish-release-drafts@v0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
tag-name: ${{ steps.get-version.outputs.version }}

View File

@ -0,0 +1,16 @@
# Automates creation of Release Drafts using Release Drafter
name: Update Release Draft
on:
push:
branches:
- master
jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- uses: release-drafter/release-drafter@v5.14.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}