Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
axelheer committed May 1, 2021
1 parent bb28d1d commit 6387129
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions .github/workflows/everything.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
uses: actions/setup-dotnet@v1
- name: Create packages (w/o version suffix)
run: dotnet pack --configuration Release --output pkg
if: github.ref == 'refs/tags/final'
if: startsWith(github.ref, 'refs/tags/v')
- name: Create packages (w/ version suffix)
run: dotnet pack --configuration Release --output pkg --version-suffix preview.${{ github.run_number }}
if: github.ref != 'refs/tags/final'
if: startsWith(github.ref, 'refs/tags/v')
- name: Upload packages
uses: actions/upload-artifact@v1
with:
Expand Down Expand Up @@ -70,20 +70,4 @@ jobs:
path: .
- name: Publish packages
run: dotnet nuget push *.nupkg --api-key ${{ secrets.NUGET_TOKEN }} --skip-duplicate --source nuget.org
- name: Extract version
run: |
if ((gci | select -p name -f 1) -match '\d+\.\d+\.\d+') {
echo "RELEASE_VERSION=$($matches[0])" >> $env:GITHUB_ENV
}
else {
write-error "There is no version."
}
- name: Create release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.RELEASE_VERSION }}
release_name: Version ${{ env.RELEASE_VERSION }}
draft: true
if: github.ref == 'refs/tags/final'
if: startsWith(github.ref, 'refs/tags/v')

0 comments on commit 6387129

Please sign in to comment.