27 lines
949 B
YAML
27 lines
949 B
YAML
on:
|
|
push:
|
|
tags:
|
|
- "v[0-9]+.[0-9]+.[0-9]+-preview[0-9][0-9][0-9]"
|
|
|
|
env:
|
|
PACKAGE_VERSION: ${GITHUB_REF/refs\/tags\/v/}
|
|
PACKAGE_OWNER: ${{ github.repository_owner }}
|
|
PACKAGE_NAME: AspNetCore.Identity.MongoDbCore.${{ env.PACKAGE_VERSION }}.nupkg
|
|
PACKAGE_SOURCE: https://git.home.cuco.li/api/packages/${{ env.PACKAGE_OWNER }}/nuget/index.json
|
|
PACKAGE_TOKEN: ${{ github.token }}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
#- name: Set VERSION variable from tag
|
|
# run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
|
|
- name: Pack
|
|
run: dotnet pack --configuration Release /p:Version=${{ env.PACKAGE_VERSION }} --output .
|
|
- name: Push
|
|
run: dotnet nuget push ${{ env.PACKAGE_NAME }} --source ${{ env.PACKAGE_SOURCE }} --api-key ${GITHUB_TOKEN}
|
|
env:
|
|
GITHUB_TOKEN: ${{ env.PACKAGE_TOKEN }} |