-
Notifications
You must be signed in to change notification settings - Fork 16
36 lines (33 loc) · 1.5 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
name: release
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
if: "!github.event.release.prerelease"
steps:
- uses: actions/checkout@v2
- name: Decrypt snk
uses: shinhwagk/[email protected]
with:
crypto-path: nacl.net.snk.enc
crypto-action: dec
crypto-password: ${{ secrets.SNK_SECRET }}
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
shell: bash
- run: echo ${{ steps.get_version.outputs.VERSION }}
- run: dotnet restore .
- run: dotnet build NaCl.net -c Release /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} /p:Version=${{ steps.get_version.outputs.VERSION }} /p:ContinuousIntegrationBuild=true
- run: sn -R NaCl.net/bin/Release/net45/NaCl.dll nacl.net.snk
- run: sn -R NaCl.net/bin/Release/net472/NaCl.dll nacl.net.snk
- run: sn -R NaCl.net/bin/Release/netstandard1.3/NaCl.dll nacl.net.snk
- run: sn -R NaCl.net/bin/Release/netstandard2.0/NaCl.dll nacl.net.snk
- run: sn -R NaCl.net/bin/Release/netstandard2.1/NaCl.dll nacl.net.snk
- run: dotnet pack NaCl.net --no-build -o . -c Release /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} /p:Version=${{ steps.get_version.outputs.VERSION }} /p:ContinuousIntegrationBuild=true
- run: dotnet nuget push *.nupkg -k $NUGET_API_KEY -s https://api.nuget.org/v3/index.json
env:
NUGET_API_KEY: ${{ secrets.NuGetAPIKey }}
shell: bash