Repository navigation
74 lines (63 loc) · 1.82 KB
/
Copy pathci.yml
File metadata and controls
74 lines (63 loc) · 1.82 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
name: CI
on: [push, pull_request]
env:
HTTPTOOLKIT_SERVER_DISABLE_AUTOUPDATE: 1 # Don't try to autoupdate during tests etc
jobs:
build:
name: Build & test
runs-on: ubuntu-22.04
container:
image: httptoolkit/act-build-base:v3.0.0
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 20.8.0
- run: npm install -g npm@^8
- name: Set up JDK 11 for Java testing
uses: actions/setup-java@v3
with:
java-version: 11
distribution: adopt-hotspot
- run: npm ci
env:
NPM_CONFIG_UNSAFE_PERM: true
- run: npm run build:src
- run: |
sudo apt-get update
sudo apt-get install -y p7zip-full
- run: npm run build:release
env:
NPM_CONFIG_UNSAFE_PERM: true
- uses: actions/upload-artifact@v3
with:
name: distributables
path: build/dist/*
if-no-files-found: error
publish:
name: Publish a release
runs-on: "ubuntu-22.04"
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs:
- build
steps:
- name: Get our distributables
uses: actions/download-artifact@v3
with:
name: distributables
path: distributables
- name: Upload server release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.PAT }}
file: ./distributables/*/*
file_glob: true
tag: ${{ github.ref }}
- name: Upload latest manifest
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.PAT }}
file: ./distributables/latest-manifest/*
file_glob: true
tag: latest-manifest
overwrite: true