Github actions
This commit is contained in:
parent
0c9add28ff
commit
cf91ae20e7
11 changed files with 336 additions and 204 deletions
31
.github/workflows/build.yml
vendored
31
.github/workflows/build.yml
vendored
|
@ -1,12 +1,33 @@
|
|||
name: Build
|
||||
on: [push, pull_request]
|
||||
name: Publish
|
||||
on: [push]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
container:
|
||||
image: openjdk:14-jdk
|
||||
image: openjdk:15-jdk
|
||||
options: --user root
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v2
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
- run: ./gradlew build --stacktrace
|
||||
|
||||
- name: Generate build number
|
||||
id: buildnumber
|
||||
uses: einaregilsson/build-number@v3
|
||||
with:
|
||||
token: ${{ secrets.github_token }}
|
||||
prefix: ${{ github.ref }}
|
||||
|
||||
- run: ./gradlew build publish --stacktrace
|
||||
env:
|
||||
MAVEN_URL: ${{ secrets.MAVEN_URL }}
|
||||
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
|
||||
CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }}
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Artifacts
|
||||
path: build/libs/
|
18
.github/workflows/check.yml
vendored
Normal file
18
.github/workflows/check.yml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
|||
name: Check
|
||||
on: [pull_request]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
container:
|
||||
image: openjdk:15-jdk
|
||||
options: --user root
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
- run: ./gradlew build --stacktrace
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Artifacts
|
||||
path: build/libs/
|
42
.github/workflows/release.yml
vendored
Normal file
42
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
|||
name: Release
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
channel:
|
||||
description: 'Release channel'
|
||||
required: true
|
||||
default: 'release'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
container:
|
||||
image: openjdk:15-jdk
|
||||
options: --user root
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
|
||||
- name: Generate build number
|
||||
id: buildnumber
|
||||
uses: einaregilsson/build-number@v3
|
||||
with:
|
||||
token: ${{ secrets.github_token }}
|
||||
prefix: ${{ github.ref }}
|
||||
|
||||
- run: ./gradlew build publish curseforge github --stacktrace
|
||||
env:
|
||||
RELEASE_CHANNEL: ${{ github.event.inputs.channel }}
|
||||
MAVEN_URL: ${{ secrets.MAVEN_URL }}
|
||||
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
|
||||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
|
||||
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}
|
||||
GITHUB_TOKEN: ${{ secrets.GH_API_KEY }}
|
||||
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
|
||||
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
|
||||
CROWDIN_KEY: ${{ secrets.CROWDIN_KEY }}
|
||||
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: Artifacts
|
||||
path: build/libs/
|
Loading…
Add table
Add a link
Reference in a new issue