-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (45 loc) · 1.26 KB
/
ci.yml
File metadata and controls
56 lines (45 loc) · 1.26 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
name: Package and Release
on:
push:
pull_request:
jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Pack Plugin
run: |
python -m mcdreforged pack -o ./package
- uses: actions/upload-artifact@v3
with:
name: CarpetBotManager distribution for ${{ github.sha }}
path: package/
- uses: actions/setup-node@v3
if: startsWith(github.ref, 'refs/tags/v')
with:
node-version: 16.x
- run: npx changelogithub
if: startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Upload binaries to release
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v2
with:
file: package/CarpetBotManager*