-
Notifications
You must be signed in to change notification settings - Fork 9
65 lines (65 loc) · 1.91 KB
/
deploy.yml
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
name: Publish new release
on:
push:
branches:
- main
jobs:
Deploy-Documentation:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
cache-dependency-path: docs/yarn.lock
- name: Install dependencies
working-directory: ./docs
run: yarn install --frozen-lockfile
- name: Build website
working-directory: ./docs
run: yarn build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build
user_name: github-actions[bot]
user_email: 41898282+github-actions[bot]@users.noreply.github.com
Build-Java-8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '8'
- run: gradle :shadowJar -b java8-build.gradle
- uses: actions/upload-artifact@v2
with:
path: build/libs/commandtimer-java8.jar
Build-Java-17:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- run: gradle :shadowJar
- uses: actions/upload-artifact@v2
with:
path: build/libs/commandtimer-java17.jar
Release:
needs:
- Build-Java-8
- Build-Java-17
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- run: echo "PLUGIN_VERSION=$(./scripts/get-version.sh)" >> $GITHUB_ENV
- run: gh release create ${{ env.PLUGIN_VERSION }} -t ${{ env.PLUGIN_VERSION }} artifact/*.jar
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}