Merge pull request #9 from bnotech/feature/fix-8.0-docs #19
Workflow file for this run
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
name: Release Preview | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+-pre[0-9][0-9][0-9]" | |
defaults: | |
run: | |
working-directory: ./Matomo.Maui | |
jobs: | |
build: | |
runs-on: windows-latest | |
env: | |
working-directory: ./Matomo.Maui | |
name: Build | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Verify commit exists in origin/main | |
run: | | |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/* | |
git branch --remote --contains | grep origin/main | |
- name: Extract tag name | |
id: tag | |
uses: actions/github-script@0.2.0 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
script: | | |
return context.payload.ref.replace(/\/refs\/tags\//, ''); | |
- name: Restore nuget packages for solution | |
run: dotnet restore | |
- name: Pack | |
run: | | |
$version=${{ steps.tag.outputs.result }} | |
$version=$version.replace("refs/tags/v", "") | |
dotnet pack --configuration Release --verbosity detailed --output ../package -p:PackageVersion=$version | |
- name: Push | |
run: | | |
$version=${{ steps.tag.outputs.result }} | |
$version=$version.replace("refs/tags/v", "") | |
$package="package/Matomo.Maui." + $version + ".nupkg" | |
dotnet nuget push $package -k "$env:NUGET_ORG_TOKEN" -Source https://api.nuget.org/v3/index.json | |
env: | |
NUGET_ORG_TOKEN: ${{ secrets.NUGET_ORG_TOKEN }} |