-
Notifications
You must be signed in to change notification settings - Fork 6
94 lines (73 loc) · 2.11 KB
/
publish_preview.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Publish Preview
on:
push:
tags: ["*"]
permissions:
pull-requests: write
contents: write
jobs:
version:
runs-on: windows-latest
outputs:
version: ${{ github.ref_name }}
steps:
- name: Version
run: Write-Host "publish version is ${{ github.ref_name }}" -Foreground Green
build:
runs-on: windows-latest
needs: version
outputs:
version: ${{ needs.version.outputs.version }}
strategy:
matrix:
platform: [x64, arm64]
env:
Platform: ${{ matrix.platform }}
Version: ${{ needs.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.3.1
- name: Build
run: ./build.ps1 -Architecture $env:Platform -Version $env:Version
- name: Metadata
run: ./metadata.ps1 -Architecture $env:Platform -Version $env:Version
- name: Upload Artifact
uses: actions/upload-artifact@v3.1.2
with:
name: metadata_${{ matrix.platform }}
path: build/metadata/
- name: Create Release
uses: softprops/action-gh-release@v1
with:
draft: true
prerelease: true
files: ./build/release/package/*
metadata:
runs-on: windows-latest
needs: build
steps:
- name: Checkout Metadata
uses: actions/checkout@v3
with:
ref: metadata
- name: Download Artifact x64
uses: actions/download-artifact@v3.0.2
with:
name: metadata_x64
- name: Download Artifact arm64
uses: actions/download-artifact@v3.0.2
with:
name: metadata_arm64
- name: Create Metadata Pull Request
uses: peter-evans/create-pull-request@v5
with:
branch: update-metadata/v1
delete-branch: true
title: update metadata ${{ needs.build.outputs.version }}
commit-message: update metadata ${{ needs.build.outputs.version }}