From f1d3a2f39c945295779b7d8addc619c9f4640bd4 Mon Sep 17 00:00:00 2001 From: xjasonlyu Date: Sat, 28 May 2022 23:30:34 +0800 Subject: [PATCH] add workflows --- .github/workflows/dotnetcore.yml | 45 ++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/dotnetcore.yml diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml new file mode 100644 index 0000000..fa2cff3 --- /dev/null +++ b/.github/workflows/dotnetcore.yml @@ -0,0 +1,45 @@ +name: Build Plugins + +on: + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + persist-credentials: false + fetch-depth: 0 + + - name: Setup Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 6.0.x + + - name: Generate Version + id: shell + run: | + echo ::set-output name=version::$(date '+%Y.%m%d.%H%M') + + - name: Build Plugins + run: | + dotnet build --configuration Release -p:Version=${{ steps.shell.outputs.version }} + dotnet build --configuration Release.Emby -p:Version=${{ steps.shell.outputs.version }} + + - name: Upload Plugins + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + body: Auto Released by Actions + draft: false + tag_name: v${{ steps.shell.outputs.version }} + files: | + Jellyfin.Plugin.JavTube/bin/Jellyfin.JavTube@v${{ steps.shell.outputs.version }}.zip + Jellyfin.Plugin.JavTube/bin/Emby.JavTube@v${{ steps.shell.outputs.version }}.zip