Merge pull request #16 from ArabCoders/dev #31
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Package | |
on: | |
push: | |
tags: | |
- "*" | |
env: | |
DOTNET_VERSION: "6.0.x" | |
jobs: | |
Tests: | |
uses: ./.github/workflows/tests.yml | |
publish: | |
needs: Tests | |
name: build_package | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: restore cached dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
restore-keys: ${{ runner.os }}-nuget | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build Jellyfin.Plugin.YTINFOReader --configuration Release --no-restore | |
- name: Publish | |
run: dotnet publish Jellyfin.Plugin.YTINFOReader --configuration Release --no-restore --output bin | |
- name: Package | |
id: create_package | |
shell: bash | |
run: | | |
tag=$(git describe --tags --always) | |
release_name="YTINFOReader-${tag}" | |
# Pack files | |
7z a -tzip "${release_name}.zip" "./bin/*.dll" | |
echo "::set-output name=release_name::${release_name}" | |
echo "::set-output name=release_tag::${tag}" | |
echo "::set-output name=filename::${release_name}.zip" | |
- name: Release | |
uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GH_TOKEN }}" | |
title: "${{ steps.create_package.outputs.release_tag }}" | |
automatic_release_tag: "${{ steps.create_package.outputs.release_tag }}" | |
prerelease: true | |
files: | | |
*.zip |