-
Notifications
You must be signed in to change notification settings - Fork 27
50 lines (42 loc) · 1.42 KB
/
dev-build-release.yml
File metadata and controls
50 lines (42 loc) · 1.42 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
name: Build
on:
workflow_dispatch:
push:
branches: ['*']
pull_request:
branches: ['*']
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
env:
TYCOONS_REPO_USER: ${{ secrets.EVOKE_REPO_USERNAME }}
TYCOONS_REPO_PASS: ${{ secrets.EVOKE_REPO_PASSWORD }}
steps:
- name: Clone project
uses: actions/checkout@v4
- name: Install JDK 8
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
check-latest: true
- name: Setup gradle
uses: gradle/actions/setup-gradle@v4
- name: Run build & publish with Gradle Wrapper
if: github.ref == 'refs/heads/master'
env:
OSSRH_USERNAME: ${{ secrets.CENTRAL_PORTAL_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.CENTRAL_PORTAL_TOKEN }}
run: chmod +x ./gradlew && ./gradlew publishAllPublicationsToMavenRepository
- name: Run build with Gradle Wrapper
if: github.ref != 'refs/heads/master'
run: chmod +x ./gradlew && ./gradlew build
- name: Create Release
if: github.ref != 'refs/heads/master'
uses: softprops/action-gh-release@v2
with:
name: '${{ github.ref_name }}: ${{ github.event.head_commit.message }} (${{ github.sha }})'
prerelease: ${{ github.ref != 'refs/heads/master' }}
tag_name: ${{ github.ref_name }}-${{ github.sha }}