-
-
Notifications
You must be signed in to change notification settings - Fork 5
131 lines (113 loc) · 3.13 KB
/
Copy pathbuild-proxy.yml
File metadata and controls
131 lines (113 loc) · 3.13 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Build Proxy
on:
push:
branches:
- master
paths:
- '**.yml'
- proxy/**
pull_request:
branches:
- master
paths-ignore:
- '**.md'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
VERSION: 0.2.0
jobs:
prepare:
runs-on: ubuntu-latest
steps:
- uses: jcs-actions/delete-tag-and-release@master
if: github.ref == 'refs/heads/master'
continue-on-error: true
with:
delete_release: true
tag_name: ${{ env.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
build:
needs: [prepare]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- target: linux-arm64
ext: tar.gz
exe:
- target: linux-x64
ext: tar.gz
exe:
- target: macos-arm64
ext: tar.gz
exe:
- target: macos-x64
ext: tar.gz
exe:
- target: win-arm64
ext: zip
exe: .exe
- target: win-x64
ext: zip
exe: .exe
steps:
- uses: actions/checkout@v7
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install --assume-yes qemu-user-binfmt
- uses: MOZGIII/install-ldid-action@master
with:
tag: v2.1.5-procursus7
- name: Preparing...
working-directory: proxy
run: npm install --include=dev
- name: Building...
working-directory: proxy
run: npm run-script pkg-${{ matrix.target }}
- name: Prepare content...
working-directory: proxy
run: |
mkdir dist
mv LICENSE dist
mv README.md dist
mv ../bin/ellsp${{ matrix.exe }} dist
- name: Change permissions (Unix)
if: contains(fromJSON('["tar.gz"]'), matrix.ext)
run: |
chmod -R 777 ./bin/
chmod -R 777 ./proxy/dist
- name: Tar dist (Unix)
if: contains(fromJSON('["tar.gz"]'), matrix.ext)
working-directory: proxy
run: |
tar czf ${{ matrix.target }}.${{ matrix.ext }} -C ./dist/ .
cp ${{ matrix.target }}.${{ matrix.ext }} ellsp_${{ matrix.target }}.${{ matrix.ext }}
- name: Zipping dist (Windows)
if: contains(fromJSON('["zip"]'), matrix.ext)
working-directory: proxy/dist
run: |
zip -r ${{ matrix.target }}.${{ matrix.ext }} .
mv ${{ matrix.target }}.${{ matrix.ext }} ../
cd ..
cp ${{ matrix.target }}.${{ matrix.ext }} ellsp_${{ matrix.target }}.${{ matrix.ext }}
- name: Upload for prerelease
if: github.ref == 'refs/heads/master'
uses: ncipollo/release-action@v1.21.0
with:
token: ${{ secrets.PAT }}
tag: ${{ env.VERSION }}
allowUpdates: true
prerelease: true
draft: false
artifacts: proxy/ellsp_${{ matrix.target }}.${{ matrix.ext }}
#### Upload an artifact for testing purposes
- name: Upload for tests
uses: actions/upload-artifact@v7
with:
name: ${{ matrix.target }}
path: proxy/ellsp_${{ matrix.target }}.${{ matrix.ext }}