-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,15 +45,21 @@ jobs: | |
working-directory: ./src | ||
|
||
# Setup necessary info to create tag | ||
- name: Set tag variable with v, for use in tag and release based on packed Nuget | ||
run: "echo \"RELEASE_TAG=v$(find ./src/Vipps.net -maxdepth 1 -name Vipps.net.*.nupkg | grep -oP '((\\d+)\\.(\\d+)\\.(\\d+)(.*?))')\" >> $GITHUB_ENV" | ||
- name: Set tag variable with v, for use in tag and release based on packed NuGet | ||
run: | | ||
RELEASE_VERSION=$(find ./src/Vipps.net -maxdepth 1 -name 'Vipps.net.*.nupkg' \ | ||
| head -n 1 \ | ||
| xargs -n 1 basename \ | ||
| grep -oP '(\d+\.\d+\.\d+(.*?))') | ||
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV | ||
echo "RELEASE_TAG=v${RELEASE_VERSION}" >> $GITHUB_ENV | ||
- name: Configure git username | ||
run: git config user.name github-actions-bot | ||
- name: Configure git user email | ||
run: git config user.email [email protected] | ||
# Create git tag | ||
- name: Create Tag | ||
run: git tag ${{ env.RELEASE_TAG }} -m ${{ env.RELEASE_TAG }} | ||
run: git tag v${{ env.RELEASE_TAG }} -m ${{ env.RELEASE_TAG }} | ||
- name: Publish Tag | ||
run: git push --tags | ||
# Create git release | ||
|
@@ -83,7 +89,7 @@ jobs: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
TAG: ${{ env.RELEASE_TAG }} | ||
run: | | ||
gh release upload ${{ env.RELEASE_TAG }} src/Vipps.net/Vipps.net.${{ env.RELEASE_TAG }}.nupkg --clobber | ||
gh release upload ${{ env.RELEASE_TAG }} src/Vipps.net/Vipps.net.${{ env.RELEASE_VERSION }}.nupkg --clobber | ||
# Publish Nuget package | ||
- name: Publish Nuget package | ||
run: dotnet nuget push out/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json |