-
Notifications
You must be signed in to change notification settings - Fork 6
62 lines (52 loc) · 1.83 KB
/
release.yml
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
name: "Release"
on:
workflow_dispatch:
inputs:
version:
description: Version of the package
required: true
default: '0.0.0'
schedule:
- cron: "0 0 1 * *" # First day of every month
jobs:
build-job:
name: "Build"
uses: "./.github/workflows/build.yml"
release-job:
name: "Release"
needs: [build-job]
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- name: "Clone Git repository"
uses: actions/checkout@master
with:
submodules: "recursive"
- name: "Download native libraries (win-x64)"
uses: actions/download-artifact@v1
with:
name: "native-libraries-win-x64"
path: "./lib"
- name: "Download native libraries (osx)"
uses: actions/download-artifact@v1
with:
name: "native-libraries-osx"
path: "./lib"
- name: "Download native libraries (linux-x64)"
uses: actions/download-artifact@v1
with:
name: "native-libraries-linux-x64"
path: "./lib"
- name: ".NET pack"
run: dotnet pack "./src/cs" --nologo --verbosity minimal --configuration Release -p:PackageVersion="${{ github.event.inputs.version }}" -p:RepositoryBranch="${{ github.head_ref || github.ref_name }}" -p:RepositoryCommit="${{ github.sha }}"
- name: "Upload packages to NuGet"
env:
NUGET_ACCESS_TOKEN: ${{ secrets.NUGET_ACCESS_TOKEN }}
run: dotnet nuget push "./src/cs/production/**/*.nupkg" --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key $NUGET_ACCESS_TOKEN
- name: "Create tag and GitHub release"
uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
prerelease: false
tag_name: "v${{ github.event.inputs.version }}"