diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..405d568d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,45 @@ +name: Release + +on: + release: + types: + - created + branches: master + +jobs: + build: + runs-on: ubuntu-latest + name: Build & Release + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + ref: master + - name: Setup dotnet + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.x + - name: Restore nuget packages + run: dotnet restore ShokoJellyfin/ShokoJellyfin.csproj -s https://api.nuget.org/v3/index.json -s https://pkgs.dev.azure.com/jellyfin-project/jellyfin/_packaging/unstable/nuget/v3/index.json + - name: Setup python + uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install JPRM + run: python -m pip install jprm + - name: Run JPRM + run: bash build_plugin.sh ${GITHUB_REF#refs/*/} + - name: Update release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: ./artifacts/shokojellyfin_*.zip + tag: ${{ github.ref }} + file_glob: true + - name: Update manifest + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: master + commit_message: Update repo manifest + file_pattern: manifest.json