Skip to content

Commit

Permalink
feat(ci): parametrize tag main wf
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerry Perret committed Nov 26, 2020
1 parent f16bacf commit a18bebd
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/on-tag-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,18 @@ jobs:
- name: Get Tag Version
id: getversion
run: echo "tag_version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Setup NuGet folder path
run: echo "nuget_folder_path=./nuget" >> $GITHUB_ENV
- name: Setup fsproj path
run: echo "fsproj_path=./Vp.FSharp.Sql/Vp.FSharp.Sql.fsproj" >> $GITHUB_ENV
- name: Build .NET Project
run: dotnet build --configuration Release -p:Version=${{env.tag_version}} ./Vp.FSharp.Sql/Vp.FSharp.Sql.fsproj
run: dotnet build --configuration Release -p:Version=${{env.tag_version}} ${{env.fsproj_path}}
- name: Generate NuGet Package from .NET Project
run: dotnet pack --configuration Release --no-build -p:PackageVersion=${{env.tag_version}} ./Vp.FSharp.Sql/Vp.FSharp.Sql.fsproj --output ./nuget
run: dotnet pack --configuration Release --no-build -p:PackageVersion=${{env.tag_version}} ${{env.fsproj_path}} --output ${{env.nuget_folder_path}}
- name: Get NuGet Package Path
run: |
basePath=./nuget
fileName=$(ls ${basePath}/ | head -n 1)
echo "nuget_package_path=${basePath}/${fileName}" >> $GITHUB_ENV
fileName=$(ls ${{env.nuget_folder_path}}/ | head -n 1)
echo "nuget_package_path=${{env.nuget_folder_path}}/${fileName}" >> $GITHUB_ENV
- name: Update NuGet Package to Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
Expand Down

0 comments on commit a18bebd

Please sign in to comment.