-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (45 loc) · 1.16 KB
/
Build.yml
File metadata and controls
52 lines (45 loc) · 1.16 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
name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
release:
types: [published]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.7
uses: actions/setup-python@v3
with:
python-version: "3.7"
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install build
- name: Build package
run: |
python -m build
- name: Upload a Build Artifact
uses: actions/upload-artifact@v3.1.2
with:
name: Build
path: dist/*
- name: Zip package
if: github.event_name == 'release'
run: |
cd dist
zip -r server99-websockify-token-plugin-release.zip .
mv server99-websockify-token-plugin-release.zip ../
- name: Upload to release
if: github.event_name == 'release'
uses: svenstaro/upload-release-action@2.9.0
with:
repo_token: ${{ secrets.TOKEN }}
file: server99-websockify-token-plugin-release.zip
tag: ${{ github.ref }}
file_glob: true