Skip to content

Commit

Permalink
Update publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
m-sadegh-sh committed Sep 29, 2024
1 parent 2d5fbc0 commit b023db0
Show file tree
Hide file tree
Showing 2 changed files with 123 additions and 43 deletions.
154 changes: 120 additions & 34 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,52 +3,138 @@ on:
push:
branches: [ main ]
jobs:
build:
build_zebble:
strategy:
matrix:
configuration: [ Release ]
runs-on: windows-2019
runs-on: windows-2022
steps:
- uses: actions/checkout@v2

# - name: Publish a new Zebble package
# uses: brandedoutcast/publish-nuget@v2
# with:
# PROJECT_FILE_PATH: Zebble/Zebble.csproj
# NUGET_KEY: ${{secrets.NUGET_API_KEY}}

- uses: actions/checkout@v4

- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'

- name: Install MAUI
run: dotnet workload install ios android maui --source https://aka.ms/dotnet8/nuget/index.json --source https://api.nuget.org/v3/index.json

- name: Install Zebble's CLI tools
run: dotnet tool install --global zebble-build

- name: Publish a new Zebble package
run: zebble-build update-plugin --api-key ${{secrets.NUGET_API_KEY}} --publish
working-directory: Zebble

build_zebble_build:
strategy:
matrix:
configuration: [ Release ]
runs-on: windows-2022
steps:
- uses: actions/checkout@v4

- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'

- name: Install Zebble's CLI tools
run: dotnet tool install --global zebble-build

- name: Publish a new Zebble.Build package
uses: brandedoutcast/publish-nuget@v2
run: zebble-build update-plugin --api-key ${{secrets.NUGET_API_KEY}} --publish
working-directory: Zebble.Build

build_zebble_compile_zbl:
strategy:
matrix:
configuration: [ Release ]
runs-on: windows-2022
steps:
- uses: actions/checkout@v4

- uses: actions/setup-dotnet@v4
with:
PROJECT_FILE_PATH: Zebble.Build/Zebble.Build.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}

dotnet-version: '8.x'

- name: Install Zebble's CLI tools
run: dotnet tool install --global zebble-build

- name: Publish a new Zebble.CompileZbl package
uses: brandedoutcast/publish-nuget@v2
run: zebble-build update-plugin --api-key ${{secrets.NUGET_API_KEY}} --publish
working-directory: Zebble.CompileZbl

build_zebble_css:
strategy:
matrix:
configuration: [ Release ]
runs-on: windows-2022
steps:
- uses: actions/checkout@v4

- uses: actions/setup-dotnet@v4
with:
PROJECT_FILE_PATH: Zebble.CompileZbl/Zebble.CompileZbl.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}

dotnet-version: '8.x'

- name: Install Zebble's CLI tools
run: dotnet tool install --global zebble-build

- name: Publish a new Zebble.Css package
uses: brandedoutcast/publish-nuget@v2
run: zebble-build update-plugin --api-key ${{secrets.NUGET_API_KEY}} --publish
working-directory: Zebble.Css

build_zebble_format_zbl:
strategy:
matrix:
configuration: [ Release ]
runs-on: windows-2022
steps:
- uses: actions/checkout@v4

- uses: actions/setup-dotnet@v4
with:
PROJECT_FILE_PATH: Zebble.Css/Zebble.Css.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}

dotnet-version: '8.x'

- name: Install Zebble's CLI tools
run: dotnet tool install --global zebble-build

- name: Publish a new Zebble.FormatZbl package
uses: brandedoutcast/publish-nuget@v2
run: zebble-build update-plugin --api-key ${{secrets.NUGET_API_KEY}} --publish
working-directory: Zebble.FormatZbl

build_zebble_image:
strategy:
matrix:
configuration: [ Release ]
runs-on: windows-2022
steps:
- uses: actions/checkout@v4

- uses: actions/setup-dotnet@v4
with:
PROJECT_FILE_PATH: Zebble.FormatZbl/Zebble.FormatZbl.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}

dotnet-version: '8.x'

- name: Install Zebble's CLI tools
run: dotnet tool install --global zebble-build

- name: Publish a new Zebble.Image package
uses: brandedoutcast/publish-nuget@v2
run: zebble-build update-plugin --api-key ${{secrets.NUGET_API_KEY}} --publish
working-directory: Zebble.Image

build_zebble_schema:
strategy:
matrix:
configuration: [ Release ]
runs-on: windows-2022
steps:
- uses: actions/checkout@v4

- uses: actions/setup-dotnet@v4
with:
PROJECT_FILE_PATH: Zebble.Image/Zebble.Image.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}

dotnet-version: '8.x'

- name: Install Zebble's CLI tools
run: dotnet tool install --global zebble-build

- name: Publish a new Zebble.Schema package
uses: brandedoutcast/publish-nuget@v2
with:
PROJECT_FILE_PATH: Zebble.Schema/Zebble.Schema.csproj
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
run: zebble-build update-plugin --api-key ${{secrets.NUGET_API_KEY}} --publish
working-directory: Zebble.Schema
12 changes: 3 additions & 9 deletions Zebble/Zebble.csproj
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project Sdk="MSBuild.Sdk.Extras/3.0.44">
<PropertyGroup>
<TargetFrameworks>net8.0;net8.0-android;net8.0-ios</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net8.0-windows10.0.19041.0</TargetFrameworks>
<TargetFrameworks Condition=" '$(OS)' == 'Windows_NT' ">$(TargetFrameworks);net8.0-windows10.0.19041</TargetFrameworks>
<AssemblyName>Zebble</AssemblyName>
<RootNamespace>Zebble</RootNamespace>
<PackageId>Zebble</PackageId>
<Product>$(AssemblyName) ($(TargetFramework))</Product>
<Version>5.1.0.0</Version>
<Version>5.1.2.0</Version>
<PackOnBuild>true</PackOnBuild>
<NeutralLanguage>en</NeutralLanguage>
<NoWarn>0618;0162</NoWarn>
Expand Down Expand Up @@ -101,13 +101,7 @@
<Import Project="..\Mvvm\Mvvm.projitems" Label="Shared" />
<Import Project="..\SharedApp\SharedApp.projitems" Label="Shared" />
<Import Project="..\Abstractions\Abstractions.projitems" Label="Shared" />
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(Running)'=='local'">
<Exec Command="update-local-nuget-cache $(TargetDir)" />
</Target>
<ItemGroup>
<PackageReference Update="Microsoft.Maui.Controls" Version="9.0.0-rc.1.24453.9" />
</ItemGroup>
<ItemGroup>
<PackageReference Update="Microsoft.Maui.Controls.Compatibility" Version="9.0.0-rc.1.24453.9" />
</ItemGroup>
</Project>

0 comments on commit b023db0

Please sign in to comment.