-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (63 loc) · 2.15 KB
/
build.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Run Build and Package
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
publish_artifacts:
description: 'Publish artifacts'
required: true
default: 'true'
schedule:
- cron: '0 0 * * 0'
jobs:
main:
runs-on: ${{ matrix.environment }}
strategy:
matrix:
environment:
- ubuntu-latest
fail-fast: false
env:
DOTNET_NOLOGO: 1
DOTNET_CLI_TELEMETRY_OPTOUT: 1
NUGET_PACKAGES: ${{ github.workspace }}/.github/nuget-packages
steps:
- name: 📝 Fetch Sources 📝
uses: actions/checkout@v4
- name: 🛠 Build Sdk 🛠
shell: bash
run: dotnet build -c Release src/sdk/FStarLang.Sdk.csproj
- name: 🛠 Build Runtime win-x64 🛠
shell: bash
run: dotnet build -r win-x64 -c Release src/runtime/FStarLang.Runtime.csproj
- name: 🛠 Build Runtime linux-x64 🛠
shell: bash
run: dotnet build -r linux-x64 -c Release src/runtime/FStarLang.Runtime.csproj
- name: 🛠 Build Runtime osx-x64 🛠
shell: bash
run: dotnet build -r osx-x64 -c Release src/runtime/FStarLang.Runtime.csproj
- name: 🛠 Pack ProjectTemplates 🛠
shell: bash
run: dotnet pack -c Release src/templates/FStarLang.DotNet.Common.ProjectTemplates.1.0.csproj
- uses: actions/[email protected]
with:
name: nuget
path: artifacts/package/release
if-no-files-found: error
retention-days: 1
publish:
runs-on: ubuntu-latest
needs: [main]
steps:
- uses: actions/[email protected]
with:
name: nuget
path: artifacts/package/release/
- name: Setup .NET
uses: actions/setup-dotnet@v4
- name: Publish nuget package
run: dotnet nuget push "artifacts/package/release/*.nupkg" --source https://codevision.pkgs.visualstudio.com/FStarLang/_packaging/fstarlang/nuget/v3/index.json --api-key ${{ secrets.AZ_DEVOPS_KEY }} --skip-duplicate
if: github.event_name == 'push' || github.event.inputs.publish_artifacts == 'true'