Skip to content

Commit

Permalink
Github workflow конфиги и убрал версию из csproj (#1)
Browse files Browse the repository at this point in the history
* Github workflow конфиги и убрал версию из csproj

* Обновил common

* переименовал шаг релиза

Co-authored-by: Aidar.Shaikhiev <[email protected]>
  • Loading branch information
muphblu and Aidar.Shaikhiev authored Sep 27, 2021
1 parent a3f8e47 commit d62f153
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 4 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x' # SDK Version to use; x will use the latest version of the 3.1 channel
- name: Build
run: dotnet build --configuration Release
23 changes: 23 additions & 0 deletions .github/workflows/release-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+-*"
jobs:
release-preview:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x' # SDK Version to use; x will use the latest version of the 3.1 channel
- name: Pack
run: dotnet pack --configuration Release /p:Version=${VERSION} --output .
- name: Push
run: dotnet nuget push atisu.services.rabbitmq.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${ATISERVICES_NUGET_APIKEY}
env:
ATISERVICES_NUGET_APIKEY: ${{ secrets.ATISERVICES_NUGET_APIKEY }}
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
jobs:
release:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Verify commit exists in origin/master
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/master
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x' # SDK Version to use; x will use the latest version of the 3.1 channel
- name: Build
run: dotnet build --configuration Release /p:Version=${VERSION}
- name: Pack
run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
- name: Push
run: dotnet nuget push atisu.services.rabbitmq.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${ATISERVICES_NUGET_APIKEY}
env:
ATISERVICES_NUGET_APIKEY: ${{ secrets.ATISERVICES_NUGET_APIKEY }}
5 changes: 1 addition & 4 deletions ATI.Services.RabbitMQ/ATI.Services.RabbitMQ.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
<PropertyGroup Label="Main">
<TargetFramework>netcoreapp3.1</TargetFramework>
<RuntimeIdentifiers>linux-x64</RuntimeIdentifiers>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>Team Services</Authors>
<Company>ATI</Company>
<LangVersion>9</LangVersion>
<VersionPrefix>2.3.1</VersionPrefix>
<PublishReadyToRun>true</PublishReadyToRun>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageVersion>3.0.0</PackageVersion>
<PackageId>atisu.services.rabbitmq</PackageId>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
</PropertyGroup>
Expand All @@ -20,7 +17,7 @@
<NoWarn>1701;1702;CS1591;CS1571;CS1573;CS1574</NoWarn>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="atisu.services.common" Version="7.6.2" />
<PackageReference Include="atisu.services.common" Version="7.7.3-rc1" />
<PackageReference Include="EasyNetQ" Version="6.3.1" />
</ItemGroup>
</Project>

0 comments on commit d62f153

Please sign in to comment.