-
Notifications
You must be signed in to change notification settings - Fork 1
92 lines (76 loc) · 2.19 KB
/
Copy pathrelease.yml
File metadata and controls
92 lines (76 loc) · 2.19 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
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
env:
XRAY_VERSION: v26.3.27
jobs:
build:
name: Build ${{ matrix.rid }}
strategy:
fail-fast: false
matrix:
include:
- rid: win-x64
os: windows-latest
- rid: win-arm64
os: windows-latest
- rid: linux-x64
os: ubuntu-latest
- rid: linux-arm64
os: ubuntu-latest
- rid: osx-x64
os: ubuntu-latest
- rid: osx-arm64
os: macos-latest
- rid: android-arm64
os: ubuntu-latest
android: true
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Install Android workload
if: matrix.android == true
run: dotnet workload install android
- name: Package Android APK
if: matrix.android == true
shell: pwsh
run: ./scripts/package-android-release.ps1 -XrayVersion ${{ env.XRAY_VERSION }}
- name: Package ${{ matrix.rid }}
if: matrix.android != true
shell: pwsh
run: ./scripts/package-all.ps1 -Rid ${{ matrix.rid }} -XrayVersion ${{ env.XRAY_VERSION }}
- uses: actions/upload-artifact@v4
with:
name: v2rayF-${{ matrix.rid }}
path: dist/v2rayF-${{ matrix.rid }}.zip
if-no-files-found: error
release:
name: Publish GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: actions/download-artifact@v4
with:
path: artifacts
pattern: v2rayF-*
merge-multiple: true
- name: List release assets
run: find artifacts -type f -name "*.zip" -ls
- uses: softprops/action-gh-release@v2
with:
name: v2rayF ${{ github.ref_name }}
files: artifacts/**/*.zip
body_path: docs/releases/${{ github.ref_name }}.md
generate_release_notes: false
draft: false
prerelease: ${{ contains(github.ref_name, '-') }}