-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.29 KB
/
template.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
name: Create and Publish Visual Studio Project Template
on:
push:
branches:
- main
workflow_dispatch:
jobs:
create-template:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '8.x' # Specify your .NET version
- name: Install necessary workloads
run: |
dotnet workload install maui-android
- name: Install necessary tools
run: sudo apt-get install -y zip
- name: Build the project
run: dotnet build --framework net8.0-android
- name: Create template package
run: dotnet pack --configuration Release --output ./nupkgs
- name: Create new branch for template
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b template-branch
git add ./nupkgs/*.nupkg
git commit -m "Add project template package"
git push origin template-branch
- name: Upload template package as artifact
uses: actions/upload-artifact@v3
with:
name: project-template
path: ./nupkgs/*.nupkg