-
Notifications
You must be signed in to change notification settings - Fork 26
95 lines (92 loc) · 2.54 KB
/
release.yml
File metadata and controls
95 lines (92 loc) · 2.54 KB
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
95
---
name: Release notation-azure-kv
on:
push:
tags:
- 'v*'
# Contents write required for release PRs
permissions:
contents: write
jobs:
build:
strategy:
matrix:
config:
- runtime: osx-x64
build_args: ""
os: ubuntu-24.04
- runtime: osx-arm64
build_args: ""
os: ubuntu-24.04
- runtime: linux-x64
build_args: --enable-aot
os: ubuntu-24.04
- runtime: linux-arm64
build_args: --enable-aot
os: ubuntu-24.04-arm
- runtime: win-x64
build_args: --enable-aot
os: windows-2022
name: Build
runs-on: ${{ matrix.config.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- name: Build .NET project
shell: bash
run: python3 ./scripts/build.py "${GITHUB_REF_NAME}" ${{ matrix.config.runtime }} ${{ matrix.config.build_args }}
- name: Upload ${{ matrix.config.runtime }} artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config.runtime }}
path: ${{ github.workspace }}/bin/artifacts/*
retention-days: 1
macos_codesign:
strategy:
matrix:
runtime: ["osx-x64", "osx-arm64"]
name: Codesign
runs-on: macos-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: ${{ matrix.runtime }}
path: ${{ github.workspace }}/bin/artifacts
- name: Codesign
run: bash ./scripts/codesign.sh
- name: Upload ${{ matrix.runtime }} artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.runtime }}
path: ${{ github.workspace }}/bin/artifacts
overwrite: true
retention-days: 1
release:
name: Release
runs-on: ubuntu-24.04
needs: macos_codesign
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: ${{ github.workspace }}/bin/artifacts
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: bash ./scripts/release.sh "${GITHUB_REF_NAME}"