forked from fabulous-dev/Fabulous
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1.3 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
name: Build
on:
push:
branches: [ 'v2.0' ]
paths-ignore: [ 'docs/**' ]
permissions: write-all
jobs:
build:
runs-on: macos-latest
env:
SLN_FILE: Fabulous-NoSamples.sln
VERSION: 2.0.8
steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.401
- name: Restore
run: dotnet restore ${SLN_FILE}
- name: Build
run: dotnet build -p:Version=${VERSION}-nightly-${GITHUB_RUN_ID} --no-restore --configuration Release ${SLN_FILE}
- name: Test
run: dotnet test -p:Version=${VERSION}-nightly-${GITHUB_RUN_ID} --no-build --configuration Release ${SLN_FILE}
- name: Pack
run: |
find templates -type f -name template.json | xargs sed -i bak "s/FABULOUS_PKG_VERSION/${VERSION}-nightly-${GITHUB_RUN_ID}/g"
dotnet pack -p:Version=${VERSION}-nightly-${GITHUB_RUN_ID} --configuration Release --output nupkgs ${SLN_FILE}
dotnet pack -p:Version=${VERSION}-nightly-${GITHUB_RUN_ID} -p:IsNightlyBuild=true --configuration Release --output nupkgs templates/Fabulous.XamarinForms.Templates.proj
- name: Push
run: |
dotnet nuget push "nupkgs/*.nupkg" -s https://nuget.pkg.github.com/fsprojects/index.json -k ${{ secrets.GITHUB_TOKEN }} --skip-duplicate