-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (57 loc) · 2.08 KB
/
fetch-papermc.yml
File metadata and controls
57 lines (57 loc) · 2.08 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
name: Fetch PaperMC
on:
workflow_dispatch:
schedule:
- cron: "0 2 * * *"
jobs:
build-spigot:
strategy:
matrix:
version:
[
1.17,
1.17.1,
# 1.18, Has Only experimental channel. Let's dont use it, until someone really wants it
1.18.1,
1.18.2,
1.19,
1.19.1,
1.19.2,
1.19.3,
1.19.4,
1.20.1,
1.20.2,
1.20.4,
1.20.6,
1.21.1,
1.21.3,
1.21.4,
1.21.5,
1.21.6,
1.21.7,
1.21.8,
1.21.9,
1.21.10,
1.21.11,
]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Fetch latest builds
run: wget -O builds.json https://api.papermc.io/v2/projects/paper/versions/${{ matrix.version }}/builds
- name: Fetch latest stable
run: echo "BUILD_NUMBER=$(cat builds.json | jq '[ .builds[] | select(.channel == "default") ] | sort_by(.build) | .[-1].build')" >> $GITHUB_ENV
- name: Fetch Experimental if no stable found
run: echo "BUILD_NUMBER=$(cat builds.json | jq '[ .builds[] | select(.channel == "experimental") ] | sort_by(.build) | .[-1].build')" >> $GITHUB_ENV
if: env.BUILD_NUMBER == 'null'
- run: wget -O paper-${{ matrix.version }}.jar https://api.papermc.io/v2/projects/paper/versions/${{ matrix.version }}/builds/${{ env.BUILD_NUMBER }}/downloads/paper-${{ matrix.version }}-${{ env.BUILD_NUMBER }}.jar
- run: mkdir -p papermc && mv paper-${{ matrix.version }}.jar papermc/paper-${{ matrix.version }}.jar
- uses: jakejarvis/s3-sync-action@master
env:
AWS_S3_BUCKET: ${{ secrets.PRESIGN_BUCKET_NAME }}
AWS_ACCESS_KEY_ID: ${{ secrets.PRESIGN_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.PRESIGN_SECRET_KEY }}
AWS_S3_ENDPOINT: http://${{ secrets.PRESIGN_S3_ENDPOINT }}
AWS_REGION: "fsn1"
SOURCE_DIR: papermc
DEST_DIR: minecraft/papermc