30 lines
1.2 KiB
YAML
30 lines
1.2 KiB
YAML
name: Deploy Elsa 3 packages
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v3.0.0-test2"
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
- name: Verify commit exists in origin/v3
|
|
run: |
|
|
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
|
|
git branch --remote --contains | grep origin/v3
|
|
- name: Set VERSION variable from tag
|
|
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
|
|
- name: Build
|
|
run: dotnet build --configuration Release /p:Version=${VERSION}
|
|
- name: Test
|
|
run: dotnet test --configuration Release /p:Version=${VERSION} --no-build
|
|
- name: Pack
|
|
run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --output .
|
|
- name: Authenticate
|
|
run: dotnet nuget add source --username sfmskywalker --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/elsa-workflows/index.json"
|
|
- name: Push
|
|
run: dotnet nuget push "*.nupkg" --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |