mirror of
https://github.com/colhountech/DarkUI.Net5.git
synced 2024-10-16 14:56:49 +03:00
31 lines
1.2 KiB
YAML
31 lines
1.2 KiB
YAML
on:
|
|
push:
|
|
tags:
|
|
- "v[0-9]+.[0-9]+.[0-9]+"
|
|
jobs:
|
|
build:
|
|
runs-on: windows-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Verify commit exists in origin/master
|
|
run: git branch --remote --contains | grep origin/master
|
|
- name: Extract release notes
|
|
run: |
|
|
git log --pretty=format:'%d %s' ${GITHUB_REF} | perl -pe 's| \(.*tag: v(\d+.\d+.\d+(-preview\d{3})?)(, .*?)*\)|\n## \1\n|g' > RELEASE-NOTES
|
|
- name: Set VERSION variable from tag
|
|
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
|
|
- name: Build
|
|
run: echo dotnet build --configuration Release /p:Version=${VERSION}
|
|
- name: Test
|
|
run: echo dotnet test --configuration Release /p:Version=${VERSION} --no-build
|
|
- name: Pack
|
|
run: echo dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
|
|
- name: Push
|
|
run: echo dotnet nuget push NuGet.Workflow.${VERSION}.nupkg --source https://nuget.pkg.github.com/acraven/index.json --api-key ${GITHUB_TOKEN}
|
|
env:
|
|
#GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.DUMMY_GITHUB_TOKEN }} |