add github action

This commit is contained in:
Matthew Strasiotto
2022-06-04 20:35:45 +10:00
parent 9b4393981c
commit 0e590858c0
2 changed files with 110 additions and 0 deletions
+62
View File
@@ -0,0 +1,62 @@
name: Publish Nightly
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore
- name: Build Dotnet
run: dotnet build --no-restore --warnaserror
- name: "Flag as nightly in build.yaml"
uses: fjogeleit/[email protected]
with:
valueFile: 'build.yaml'
propertyPath: 'version'
value: "0.0.0.9000"
commitChange: false
updateFile: true
- name: "JPRM: Build"
id: jrpm
uses: oddstr13/jellyfin-plugin-repository-manager@master
with:
version: "0.0.0.9000"
verbosity: debug
path: .
dotnet-target: "net6.0"
output: _dist
- name: Publish output artifacts
id: publish-assets
uses: softprops/action-gh-release@50195ba7f6f93d1ac97ba8332a178e008ad176aa
with:
prerelease: false
fail_on_unmatched_files: true
tag_name: nightly
files: |
_dist/*
build.yaml
body: |
Nightly build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish Plugin Manifest
uses: matthewstrasiotto/jellyfin-plugin-repo-action@dev-working
with:
ignorePrereleases: false
githubToken: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
pagesBranch: manifest-release
pagesFile: manifest.json
+48
View File
@@ -0,0 +1,48 @@
name: Publish Release
on:
release:
types:
- released
workflow_dispatch:
jobs:
build:
uses: jellyfin/jellyfin-meta-plugins/.github/workflows/build.yaml@master
with:
dotnet-version: "6.0.*"
dotnet-target: "net6.0"
upload:
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Download Artifact
uses: actions/[email protected]
with:
name: build-artifact
- name: Prepare GitHub Release assets
run: |-
for file in ./*; do
md5sum ${file#./} >> ${file%.*}.md5
sha256sum ${file#./} >> ${file%.*}.sha256
done
ls -l
- name: Upload GitHub Release assets
uses: shogo82148/[email protected]
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./*
generate:
runs-on: ubuntu-latest
needs:
- upload
steps:
- name: Publish Plugin Manifest
uses: matthewstrasiotto/jellyfin-plugin-repo-action@dev-working
with:
ignorePrereleases: false
githubToken: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.repository }}
pagesBranch: manifest-release
pagesFile: manifest.json