-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (62 loc) · 2.31 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Release
on:
workflow_dispatch:
inputs:
pre-release:
description: Genereates a Pre-Release when checked
type: boolean
required: false
default: "false"
push:
branches:
- release/**
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Get version for next release
if: ${{ github.event.inputs.version == '' }}
uses: wemogy/next-version-action@2.0.3
id: release-version
with:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3
# Nuget
- name: Build .NET
uses: ./.github/actions/dotnet
with:
version: ${{ steps.release-version.outputs.next-version }}${{ github.event.inputs.version && 'pre' || '' }}
- name: Create Nuget package(s)
run: dotnet pack --configuration Release /p:VersionPrefix=${{ steps.release-version.outputs.next-version }}${{ github.event.inputs.version && 'pre' || '' }}
working-directory: src
- name: Publish Nuget package(s)
run: dotnet nuget push **/**/*.nupkg --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.PUBLIC_NUGET_TOKEN }}
working-directory: src
# Update Documentation
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "16.x"
- run: yarn install
working-directory: docs/public
- run: yarn build
working-directory: docs/public
- run: |
git config --global user.name $GITHUB_ACTOR
git config --global user.email $GITHUB_ACTOR@users.noreply.github.com
yarn deploy --skip-build
working-directory: docs/public
env:
GIT_USER: $GITHUB_ACTOR
GIT_PASS: ${{ secrets.GITHUB_TOKEN }}
# GitHub
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
name: Version ${{ steps.release-version.outputs.next-version }}${{ github.event.inputs.version && 'pre' || '' }}
tag_name: ${{ steps.release-version.outputs.next-version-name }}${{ github.event.inputs.version && 'pre' || '' }}
prerelease: ${{ github.event.inputs.pre-release || false }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}