Skip to content

Commit

Permalink
Add github action for build the cli
Browse files Browse the repository at this point in the history
  • Loading branch information
Pejman Nikram committed Jan 4, 2024
1 parent a4dd4b0 commit 85ba654
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 1 deletion.
53 changes: 53 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Release

on:
push:
tags:
- "*"
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
rid: [win-x64, linux-x64, linux-arm, osx-x64, osx-arm64]
name: Build for ${{ matrix.rid }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.x"

- name: publish app for ${{ matrix.rid }}
run: dotnet publish src/Lazvard.Message.Cli -r ${{ matrix.rid }} -c Release -o ./publish /p:DebugType=None /p:DebugSymbols=false

- name: Archive release for ${{ matrix.rid }}
uses: thedoctor0/[email protected]
with:
type: "zip"
directory: "./publish/"
filename: "${{ matrix.rid }}.zip"
path: "."

- name: Push ${{ matrix.rid }}.zip to release
uses: ncipollo/release-action@v1
with:
artifacts: "./publish/${{ matrix.rid }}.zip"
allowUpdates: true
draft: true

nuget:
runs-on: ubuntu-latest
name: Nuget Push
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.x"
- name: build app
run: dotnet build src/Lazvard.Message.Amqp.Server -c Release -o ./publish/
- name: Nuget Push
run: dotnet nuget push ./publish/*.nupkg -k ${{ secrets.NUGET_TOKEN }} -s https://api.nuget.org/v3/index.json
8 changes: 8 additions & 0 deletions Lazvard.Message.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Lazvard.Message.Amqp.Server
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{FEAC555A-EA5F-4813-B9EB-9EBF8D6B491B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{094C19EA-E8C8-456F-A200-619290E81A7F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{13223C72-2C00-4132-A551-20DD1A2CB460}"
ProjectSection(SolutionItems) = preProject
.github\workflows\release.yml = .github\workflows\release.yml
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -57,6 +64,7 @@ Global
{81266284-C5AF-4BDC-958F-E4453DB5B4C7} = {FEAC555A-EA5F-4813-B9EB-9EBF8D6B491B}
{5F8F6832-1B7F-4DCE-8B71-F21EDDBCD6A6} = {3A44C183-D3A7-4CA9-8DD5-80820CF1554D}
{CC8E4973-E5DD-49A4-BE1C-8E6D85FBDA47} = {3A44C183-D3A7-4CA9-8DD5-80820CF1554D}
{13223C72-2C00-4132-A551-20DD1A2CB460} = {094C19EA-E8C8-456F-A200-619290E81A7F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {D4EE5258-D519-4C5C-A03E-02B072688EF2}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,23 @@
<PackageProjectUrl>https://github.com/PejmanNik/lazvard-message</PackageProjectUrl>
<RepositoryUrl>https://github.com/PejmanNik/lazvard-message</RepositoryUrl>
<PackageTags>amqp;service-bus;azure-service-bus;amqp-server</PackageTags>
<Authors>pejmanNik</Authors>
<Authors>Pejman Nikram</Authors>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryType>git</RepositoryType>
<Version>1.1.0</Version>
</PropertyGroup>

<ItemGroup>
<None Remove="Program - Copy.cs;" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Iso8601DurationHelper" Version="1.1.0" />
<PackageReference Include="Microsoft.Azure.Amqp" Version="2.6.4" />
Expand Down
27 changes: 27 additions & 0 deletions src/Lazvard.Message.Cli/Lazvard.Message.Cli.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,37 @@
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<IncludeSymbols>True</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<SignAssembly>False</SignAssembly>
<Copyright>Pejman Nikram</Copyright>
<PackageProjectUrl>https://github.com/PejmanNik/lazvard-message</PackageProjectUrl>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/PejmanNik/lazvard-message</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<PackageLicenseFile>LICENSE</PackageLicenseFile>
<Title>lazvard message</Title>
<Authors>Pejman Nikram</Authors>
<Description>lightweight AMQP server - Azure Service Bus simulator</Description>
<PackageTags>amqp;service-bus;azure-service-bus;amqp-server</PackageTags>
<Version>0.1.0</Version>
<AssemblyVersion>0.1.0</AssemblyVersion>
<FileVersion>0.1.0</FileVersion>
</PropertyGroup>

<ItemGroup>
<None Include="..\..\LICENSE">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
<None Include="..\..\README.md">
<Pack>True</Pack>
<PackagePath>\</PackagePath>
</None>
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Amqp" Version="2.6.4" />
<PackageReference Include="Tommy" Version="3.1.2" />
Expand Down

0 comments on commit 85ba654

Please sign in to comment.