70 lines
No EOL
1.7 KiB
YAML
70 lines
No EOL
1.7 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
|
|
jobs:
|
|
release:
|
|
name: Create GitHub release
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Generate changelog
|
|
id: changelog
|
|
uses: mikepenz/release-changelog-builder-action@v5
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "lts/*"
|
|
|
|
- name: Set up .NET
|
|
uses: actions/setup-dotnet@v3
|
|
with:
|
|
dotnet-version: '9'
|
|
|
|
- name: Build Frontend
|
|
working-directory: client
|
|
run: |
|
|
npm ci
|
|
npm run build
|
|
|
|
- name: Build, Test and Publish Backend
|
|
working-directory: server
|
|
shell: pwsh
|
|
run: |
|
|
$v = "${{ github.ref_name }}".TrimStart('v')
|
|
dotnet restore
|
|
dotnet test
|
|
dotnet build -c Release --no-restore -p:Version=$v -p:AssemblyVersion=$v
|
|
dotnet publish RdtClient.Web/RdtClient.Web.csproj -c Release --no-build -p:Version=$v -p:AssemblyVersion=$v -o ../publish
|
|
|
|
- name: Create ZIP
|
|
run: |
|
|
cd publish
|
|
zip -r ../RealDebridClient.zip .
|
|
cd ..
|
|
|
|
- name: Create Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
tag_name: ${{ github.ref_name }}
|
|
name: ${{ github.ref_name }}
|
|
body: ${{ steps.changelog.outputs.changelog }}
|
|
draft: false
|
|
prerelease: false
|
|
files: RealDebridClient.zip
|
|
token: ${{ secrets.GITHUB_TOKEN }} |