Add GitHub actions
This commit is contained in:
parent
8b4371da3d
commit
09d4dbd5a4
18
.github/workflows/ci.yml
vendored
Normal file
18
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
on:
|
||||
push:
|
||||
branches:
|
||||
- v3
|
||||
pull_request:
|
||||
branches:
|
||||
- v3
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Build
|
||||
run: dotnet build --configuration Release
|
||||
- name: Test
|
||||
run: dotnet test --configuration Release --no-build
|
||||
29
.github/workflows/release.yml
vendored
Normal file
29
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v[0-9]+.[0-9]+.[0-9]+"
|
||||
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 ${{ GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/elsa-core/index.json"
|
||||
- name: Push
|
||||
run: dotnet nuget push "*/**/*.nupkg" --api-key ${GITHUB_TOKEN} --source "github"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
3
Elsa.sln
3
Elsa.sln
|
|
@ -14,6 +14,9 @@ ProjectSection(SolutionItems) = preProject
|
|||
docker-compose.yml = docker-compose.yml
|
||||
common.props = common.props
|
||||
configureawait.props = configureawait.props
|
||||
.github\workflows\ci.yml = .github\workflows\ci.yml
|
||||
.github\workflows\release.yml = .github\workflows\release.yml
|
||||
.gitignore = .gitignore
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{0354F050-3992-4DD4-B0EE-5FBA04AC72B6}"
|
||||
|
|
|
|||
Loading…
Reference in a new issue