-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (51 loc) 路 2.18 KB
/
Copy pathazure-dev.yml
File metadata and controls
63 lines (51 loc) 路 2.18 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
name: (Dev) Upload To Azure Blob Storage
on:
push:
branches:
- develop
jobs:
upload:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
- name: Download Spigot Jar
uses: wei/curl@v1
with:
args: https://cdn.getbukkit.org/spigot/spigot-1.8.8-R0.1-SNAPSHOT-latest.jar --create-dirs -o Server/libs/spigot.jar
- name: Edit libraries folder permissions
run: sudo chmod -R 777 Server/libs/
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${{ github.sha }} | cut -c1-8`" >> $GITHUB_ENV
- name: Build shaded Jar
run: ./gradlew shadowJar -PbuildNumber=${{ github.run_number }} -PcommitSha=${SHORT_SHA}
env:
GITHUB_USERNAME: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.TOKEN }}
- name: Rename Jars
run: |
mv Server/build/libs/HyriAPI-Server-*.jar Server/build/libs/HyriAPI-Server.jar
mv Proxy/build/libs/HyriAPI-Proxy-*.jar Proxy/build/libs/HyriAPI-Proxy.jar
- name: Upload Server Jar
uses: azure/CLI@v1
env:
CONNECTION_STRING: ${{ secrets.AZURE_CONNECTION_STRING }}
CONTAINER_NAME: ${{ secrets.DEV_SERVER_CONTAINER }}
with:
inlineScript: az storage blob upload-batch --connection-string $CONNECTION_STRING --source Server/build/libs --destination $CONTAINER_NAME --destination-path hyriapi --overwrite
- name: Upload Proxy Jar
uses: azure/CLI@v1
env:
CONNECTION_STRING: ${{ secrets.AZURE_CONNECTION_STRING }}
CONTAINER_NAME: ${{ secrets.DEV_PROXY_CONTAINER }}
with:
inlineScript: az storage blob upload-batch --connection-string $CONNECTION_STRING --source Proxy/build/libs --destination $CONTAINER_NAME --destination-path hyriapi --overwrite