-
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (37 loc) · 1.18 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
name: 🚀 Release
on:
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: 🔏 Configure Secrets
uses: microsoft/variable-substitution@v1
with:
files: '**/appsettings.json'
env:
MONGO_PASSWORD: ${{ secrets.MONGO_PASSWORD }}
- name: 🧪 Test
env:
MONGO_PASSWORD: ${{ secrets.MONGO_PASSWORD }}
run: |
dotnet test
- name: 📦 Build
working-directory: ./USTACLI
run: dotnet pack -c Release
- name: 🚀 Publish to Nuget
working-directory: ./USTACLI
run: dotnet nuget push ./nupkg/*.nupkg -n -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json
- name: 🚀 Publish to GitHub
working-directory: ./USTACLI
run: dotnet nuget push ./nupkg/*.nupkg -n -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/lineville/index.json