Skip to content

Commit db88e0d

Browse files
authored
Merge pull request #96 from AutoMapper/402Preview03
Minver setup
2 parents 4799d0c + a9247b1 commit db88e0d

File tree

5 files changed

+22
-20
lines changed

5 files changed

+22
-20
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,8 @@ jobs:
1313

1414
steps:
1515
- uses: actions/checkout@v2
16-
17-
- name: Set Variables
18-
run: |
19-
echo '::set-env name=VERSION_NUMBER::4.0.2-preview-3'
20-
echo '::set-env name=DEPLOY_PACKAGE_URL::https://www.myget.org/F/automapperdev/api/v3/index.json'
21-
echo '::set-env name=DEPLOY_PACKAGE_API_KEY::${{ secrets.MYGET_CI_API_KEY }}'
22-
echo '::set-env name=REPO::${{ github.repository }}'
23-
echo '::set-env name=REPO_OWNER::${{ github.repository_owner }}'
16+
with:
17+
fetch-depth: 0
2418

2519
- name: Restore
2620
run: dotnet restore
@@ -31,7 +25,12 @@ jobs:
3125
- name: Test
3226
run: dotnet test --no-restore --verbosity normal
3327

34-
- run: echo '::set-env name=PROJECT_NAME::AutoMapper.Extensions.ExpressionMapping'
3528
- name: Pack and push
29+
env:
30+
PROJECT_NAME: AutoMapper.Extensions.ExpressionMapping
31+
DEPLOY_PACKAGE_URL: https://www.myget.org/F/automapperdev/api/v3/index.json
32+
DEPLOY_PACKAGE_API_KEY: ${{ secrets.MYGET_CI_API_KEY }}
33+
REPO: ${{ github.repository }}
34+
REPO_OWNER: ${{ github.repository_owner }}
3635
run: ./Pack_Push.ps1
3736
shell: pwsh

.github/workflows/release.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,8 @@ jobs:
1111

1212
steps:
1313
- uses: actions/checkout@v2
14-
15-
- name: Set Variables
16-
run: |
17-
echo '::set-env name=VERSION_NUMBER::4.0.2-preview-3'
18-
echo '::set-env name=DEPLOY_PACKAGE_URL::https://api.nuget.org/v3/index.json'
19-
echo '::set-env name=DEPLOY_PACKAGE_API_KEY::${{ secrets.NUGET_API_KEY }}'
20-
echo '::set-env name=REPO::${{ github.repository }}'
21-
echo '::set-env name=REPO_OWNER::${{ github.repository_owner }}'
14+
with:
15+
fetch-depth: 0
2216

2317
- name: Restore
2418
run: dotnet restore
@@ -29,7 +23,12 @@ jobs:
2923
- name: Test
3024
run: dotnet test --no-restore --verbosity normal
3125

32-
- run: echo '::set-env name=PROJECT_NAME::AutoMapper.Extensions.ExpressionMapping'
3326
- name: Pack and push
27+
env:
28+
PROJECT_NAME: AutoMapper.Extensions.ExpressionMapping
29+
DEPLOY_PACKAGE_URL: https://api.nuget.org/v3/index.json
30+
DEPLOY_PACKAGE_API_KEY: ${{ secrets.NUGET_API_KEY }}
31+
REPO: ${{ github.repository }}
32+
REPO_OWNER: ${{ github.repository_owner }}
3433
run: ./Pack_Push.ps1
3534
shell: pwsh

Directory.Build.props

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<PropertyGroup>
33
<Authors>Jimmy Bogard</Authors>
44
<LangVersion>latest</LangVersion>
5-
<VersionPrefix>4.0.2-preview-3</VersionPrefix>
65
<WarningsAsErrors>true</WarningsAsErrors>
76
<NoWarn>$(NoWarn);1701;1702;1591</NoWarn>
87
</PropertyGroup>

Pack_Push.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Write-Host "Owner ${Env:REPO_OWNER}"
44
Write-Host "Repository ${Env:REPO}"
55

66
$PROJECT_PATH = ".\src\$($Env:PROJECT_NAME)\$($Env:PROJECT_NAME).csproj"
7-
$NUGET_PACKAGE_PATH = ".\artifacts\$($Env:PROJECT_NAME).$($Env:VERSION_NUMBER).nupkg"
7+
$NUGET_PACKAGE_PATH = ".\artifacts\$($Env:PROJECT_NAME).*.nupkg"
88

99
Write-Host "Project Path ${PROJECT_PATH}"
1010
Write-Host "Package Path ${NUGET_PACKAGE_PATH}"

src/AutoMapper.Extensions.ExpressionMapping/AutoMapper.Extensions.ExpressionMapping.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@
1414
<PackageLicenseUrl>https://github.com/AutoMapper/AutoMapper.Extensions.ExpressionMapping/blob/master/LICENSE</PackageLicenseUrl>
1515
<RepositoryType>git</RepositoryType>
1616
<RepositoryUrl>https://github.com/AutoMapper/AutoMapper.Extensions.ExpressionMapping</RepositoryUrl>
17+
<MinVerTagPrefix>v</MinVerTagPrefix>
1718
</PropertyGroup>
1819

1920
<ItemGroup>
2021
<PackageReference Include="AutoMapper" Version="[10.0.0,11.0.0)" />
22+
<PackageReference Include="MinVer" Version="2.3.0">
23+
<PrivateAssets>all</PrivateAssets>
24+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
25+
</PackageReference>
2126
</ItemGroup>
2227

2328
</Project>

0 commit comments

Comments
 (0)