forked from VocaDB/ResXFileCodeGenerator
-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (48 loc) · 1.55 KB
/
release.yaml
File metadata and controls
52 lines (48 loc) · 1.55 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
name: Release
on:
workflow_dispatch:
push:
branches:
- main
permissions:
contents: read
packages: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
packages: write # to be able to make package releases
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
steps:
- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
- name: Setup Node.js
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3
with:
cache: npm
node-version: 'lts/*'
- name: Setup .NET
uses: actions/setup-dotnet@3951f0dfe7a07e2313ec93c75700083e2005cbab # v4
with:
dotnet-version: '9.0.x'
- name: Install dependencies
run: npm clean-install
- name: Test
run: dotnet test -c Release
# Get a short-lived NuGet API key
# https://www.nuget.org/account/trustedpublishing
# https://learn.microsoft.com/en-gb/nuget/nuget-org/trusted-publishing
- name: NuGet login (OIDC → temp API key)
uses: NuGet/login@v1
id: nuget
with:
user: Catglobe
- name: Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUGET_TOKEN: ${{steps.nuget.outputs.NUGET_API_KEY}}