mirror of
https://github.com/packwiz/packwiz-installer.git
synced 2025-10-14 07:14:32 +02:00
Add GH actions Maven publishing, improve buildscript
This commit is contained in:
33
.github/workflows/release.yml
vendored
Normal file
33
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
name: Java Gradle Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v\d+.\d+.\d+'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'temurin'
|
||||
cache: gradle
|
||||
- name: Publish with Gradle
|
||||
run: ./gradlew publish
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ Secrets.GITHUB_TOKEN }}
|
||||
BUNNYCDN_TOKEN: ${{ Secrets.BUNNYCDN_TOKEN }}
|
||||
RELEASE: true
|
||||
- name: Cleanup Gradle Cache
|
||||
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
|
||||
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
|
||||
run: |
|
||||
rm -f ~/.gradle/caches/modules-2/modules-2.lock
|
||||
rm -f ~/.gradle/caches/modules-2/gc.properties
|
29
.github/workflows/snapshot.yml
vendored
Normal file
29
.github/workflows/snapshot.yml
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
name: Java Gradle Snapshot
|
||||
|
||||
on: ["push", "pull_request"]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '8'
|
||||
distribution: 'temurin'
|
||||
cache: gradle
|
||||
- name: Publish with Gradle
|
||||
run: ./gradlew publish
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ Secrets.GITHUB_TOKEN }}
|
||||
BUNNYCDN_TOKEN: ${{ Secrets.BUNNYCDN_TOKEN }}
|
||||
- name: Cleanup Gradle Cache
|
||||
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
|
||||
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
|
||||
run: |
|
||||
rm -f ~/.gradle/caches/modules-2/modules-2.lock
|
||||
rm -f ~/.gradle/caches/modules-2/gc.properties
|
Reference in New Issue
Block a user