-
Notifications
You must be signed in to change notification settings - Fork 22
45 lines (37 loc) · 1.34 KB
/
packages.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
name: Publish packages
on:
push:
tags:
- "v*" # only run when a new package version is tagged
workflow_dispatch:
jobs:
build-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
- name: Install .NET SDK
uses: actions/setup-dotnet@v3
with:
dotnet-version: "8.0.x" # latest LTS build
- name: Install npm dependencies
run: npm ci
- name: Build and push package to npm
env:
FIGMA_ACCESS_TOKEN: ${{ secrets.FIGMA_ACCESS_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_API_KEY }}
run: |
if [[ ${{ github.ref }} == *"rc"* ]]; then
npm publish --tag rc
else
npm publish --tag latest
fi
- name: .NET Build
run: npm run pack:nuget
- name: Push package to nuget
run: dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_API_KEY}}