Repository navigation
73 lines (61 loc) · 1.79 KB
/
Copy pathrelease.yml
File metadata and controls
73 lines (61 loc) · 1.79 KB
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
69
70
71
72
73
name: Release
on:
release:
types:
- published
jobs:
release:
runs-on: ubuntu-latest
environment: nuget
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v7
- uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
- name: Test
run: dotnet test --solution NamedQuery.slnx
- name: Pack
env:
TAG: ${{ github.event.release.tag_name }}
run: dotnet pack TheODI.NamedQuery --configuration Release --output artifacts -p:Version=${TAG#v}
- uses: NuGet/login@v1
id: login
with:
user: ${{ secrets.NUGET_USER }}
- name: Push
run: dotnet nuget push "artifacts/*.nupkg" --api-key ${{ steps.login.outputs.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Attach packages to release
env:
GH_TOKEN: ${{ github.token }}
TAG: ${{ github.event.release.tag_name }}
run: gh release upload "$TAG" artifacts/* --clobber
docs:
needs: release
permissions:
contents: read
pages: write
id-token: write
uses: ./.github/workflows/docs.yml
context7:
needs: docs
runs-on: ubuntu-latest
environment: context7
permissions: {}
strategy:
fail-fast: false
matrix:
library:
- /theodi/namedquery
steps:
- name: Refresh
env:
CONTEXT7_API_KEY: ${{ secrets.CONTEXT7_API_KEY }}
LIBRARY: ${{ matrix.library }}
run: |
curl --fail-with-body -sS -X POST https://context7.com/api/v1/refresh \
-H "Authorization: Bearer $CONTEXT7_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"libraryName\": \"$LIBRARY\"}"