-
Notifications
You must be signed in to change notification settings - Fork 23
108 lines (105 loc) · 3.36 KB
/
release.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
---
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-latest
- runtime: osx-arm64
build_args: ""
os: ubuntu-latest
- runtime: linux-x64
build_args: --enable-aot
os: ubuntu-latest
- runtime: linux-arm64
build_args: --enable-aot
os: ubuntu-22.04
- runtime: win-x64
build_args: --enable-aot
os: windows-latest
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: Setup ARM64 Emulator
if: matrix.config.runtime == 'linux-arm64'
run: |
sudo dpkg --add-architecture arm64
sudo bash -c 'cat > /etc/apt/sources.list.d/arm64.list <<EOF
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy main restricted
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main restricted
deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports/ jammy-backports main restricted universe multiverse
EOF'
sudo sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list
sudo sed -i -e 's/deb mirror/deb [arch=amd64] mirror/g' /etc/apt/sources.list
sudo apt update
sudo apt install -y clang llvm binutils-aarch64-linux-gnu gcc-aarch64-linux-gnu zlib1g-dev:arm64
- 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-latest
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}"