Skip to content

Merge branch 'release' of https://github.com/MrYossu/Pixata.Utilities… #159

Merge branch 'release' of https://github.com/MrYossu/Pixata.Utilities…

Merge branch 'release' of https://github.com/MrYossu/Pixata.Utilities… #159

Workflow file for this run

# Release
name: release
on:
workflow_dispatch:
push:
branches: [ release ] # this workflow publishes to nuget, ONLY run it on a PUSH (no PRs)
jobs:
build_pixata:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET Core 2.1
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '2.1.x'
- name: Setup .NET Core 7
uses: actions/setup-dotnet@v1.7.2
with:
dotnet-version: '7.0'
# ***************** BUILDS **************** #
# Pixata.Blazor
- name: Restore - Pixata.Blazor Dependencies
run: dotnet restore Pixata.Blazor/Pixata.Blazor.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Blazor.csproj
run: dotnet build Pixata.Blazor/Pixata.Blazor.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.Blazor.TelerikComponents
- name: Restore - Pixata.Blazor.TelerikComponents Dependencies
run: dotnet restore Pixata.Blazor.TelerikComponents/Pixata.Blazor.TelerikComponents.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Blazor.TelerikComponents.csproj
run: dotnet build Pixata.Blazor.TelerikComponents/Pixata.Blazor.TelerikComponents.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.Blazor.LanguageExtComponents
- name: Restore - Pixata.Blazor.LanguageExtComponents Dependencies
run: dotnet restore Pixata.Blazor.LanguageExtComponents/Pixata.Blazor.LanguageExtComponents.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Blazor.LanguageExtComponents.csproj
run: dotnet build Pixata.Blazor.LanguageExtComponents/Pixata.Blazor.LanguageExtComponents.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.Blazor.Sample
- name: Restore - Pixata.Blazor.Sample Dependencies
run: dotnet restore Pixata.Blazor.Sample/Pixata.Blazor.Sample.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Blazor.Sample
run: dotnet build Pixata.Blazor.Sample/Pixata.Blazor.Sample.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.Extensions
- name: Restore - Pixata.Extensions Dependencies
run: dotnet restore Pixata.Extensions/Pixata.Extensions.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Extensions.csproj
run: dotnet build Pixata.Extensions/Pixata.Extensions.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.Email
- name: Restore - Pixata.Email Dependencies
run: dotnet restore Pixata.Email/Pixata.Email.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Email.csproj
run: dotnet build Pixata.Email/Pixata.Email.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.Functional
- name: Restore - Pixata.Functional Dependencies
run: dotnet restore Pixata.Functional/Pixata.Functional.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Functional.csproj
run: dotnet build Pixata.Functional/Pixata.Functional.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.SimilarityChooser
- name: Restore - Pixata.SimilarityChooser Dependencies
run: dotnet restore Pixata.SimilarityChooser/Pixata.SimilarityChooser.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.SimilarityChooser.csproj
run: dotnet build Pixata.SimilarityChooser/Pixata.SimilarityChooser.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.Google
- name: Restore - Pixata.Google Dependencies
run: dotnet restore Pixata.Google/Pixata.Google.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Google.csproj
run: dotnet build Pixata.Google/Pixata.Google.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# Pixata.Extensions.Tests
- name: Restore - Pixata.Extensions.Tests Dependencies
run: dotnet restore Pixata.Extensions.Tests/Pixata.Extensions.Tests.csproj --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
- name: Build - Pixata.Extensions.Tests
run: dotnet build Pixata.Extensions.Tests/Pixata.Extensions.Tests.csproj --configuration Release --configfile ./nuget.config
env:
TELERIK_USERNAME: ${{secrets.MYTELERIKACCOUNTUSERNAME}}
TELERIK_PASSWORD: ${{secrets.MYTELERIKACCOUNTPASSWORD}}
# ***************** TESTS **************** #
- name: Run Tests
run: dotnet test --verbosity normal
# ***************** PUBLISHING **************** #
- name: Publish Pixata.Blazor
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: Pixata.Blazor/Pixata.Blazor.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Pixata.Blazor.TelerikComponents
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: Pixata.Blazor.TelerikComponents/Pixata.Blazor.TelerikComponents.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Pixata.Blazor.LanguageExtComponents
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: Pixata.Blazor.LanguageExtComponents/Pixata.Blazor.LanguageExtComponents.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Pixata.Extensions
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: Pixata.Extensions/Pixata.Extensions.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Pixata.Email
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: Pixata.Email/Pixata.Email.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Pixata.Functional
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: Pixata.Functional/Pixata.Functional.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Pixata.SimilarityChooser
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: Pixata.SimilarityChooser/Pixata.SimilarityChooser.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
- name: Publish Pixata.Google
uses: alirezanet/publish-nuget@v3.0.4
with:
PROJECT_FILE_PATH: Pixata.Google/Pixata.Google.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
# *** Publish Pixata.Blazor.Sample ***
- name: Rename _app_offline.htm to app_offline.htm to stop the site
shell: python
run: |
import ftplib
with ftplib.FTP('${{ secrets.PIXATATESTFTPSERVER }}') as ftp:
ftp.login('${{ secrets.PIXATATESTFTPUSER }}', '${{ secrets.PIXATATESTFTPPASSWORD }}')
ftp.rename('_app_offline.htm', 'app_offline.htm')
ftp.quit()
- name: Publish Pixata.Blazor.Sample
run: dotnet publish Pixata.Blazor.Sample\Pixata.Blazor.Sample.csproj --framework net7.0 --output Pixata.Blazor.Sample.Publish
- name: Deploy Pixata.Blazor.Sample
uses: SamKirkland/FTP-Deploy-Action@4.0.0
with:
server: ${{ secrets.PIXATATESTFTPSERVER }}
username: ${{ secrets.PIXATATESTFTPUSER }}
password: ${{ secrets.PIXATATESTFTPPASSWORD }}
local-dir: ./Pixata.Blazor.Sample.Publish/
- name: Rename app_offline.htm back to _app_offline.htm to start the site
shell: python
run: |
import ftplib
with ftplib.FTP('${{ secrets.PIXATATESTFTPSERVER }}') as ftp:
ftp.login('${{ secrets.PIXATATESTFTPUSER }}', '${{ secrets.PIXATATESTFTPPASSWORD }}')
ftp.rename('app_offline.htm', '_app_offline.htm')
ftp.quit()