-
Notifications
You must be signed in to change notification settings - Fork 8
53 lines (50 loc) · 1.66 KB
/
publish.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
47
48
49
50
51
52
53
on:
push:
tags:
- '*'
name: Publish
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
publish:
name: Publish
runs-on: windows-latest
steps:
- name: Set variables
id: vars
run: |
echo "dotnet_version=$(dotnet --version)" >> $env:GITHUB_OUTPUT
echo "program_data=$env:ProgramData" >> $env:GITHUB_OUTPUT
- name: Restore cache
uses: actions/cache/restore@v4
with:
key: ${{ steps.vars.outputs.dotnet_version }}
path: ${{ steps.vars.outputs.program_data }}\dotnet\workloads
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64
- name: Setup .NET workloads
run: |
dotnet workload install android ios maccatalyst macos maui
Invoke-RestMethod 'https://raw.githubusercontent.com/Samsung/Tizen.NET/main/workload/scripts/workload-install.ps1' | Invoke-Expression
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- uses: olegtarasov/get-tag@v2-release
id: tag_name
- name: Build and pack
run: |
$env:VERSION_SUFFIX = "${{ steps.tag_name.outputs.tag }}" -replace "^[^\-]+-?", ""
dotnet restore
MSBuild -t:pack -p:Configuration=Release -p:PackageOutputPath=".." -v:minimal
- name: Publish
run: |
dotnet nuget push FluentIcons.*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json