mirror of
https://github.com/architectury/architectury-api.git
synced 2026-03-28 03:56:59 -05:00
Update push workflow
This commit is contained in:
28
.github/workflows/publish.yml
vendored
28
.github/workflows/publish.yml
vendored
@@ -1,28 +0,0 @@
|
||||
name: Java CI
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**.gradle'
|
||||
- '**.properties'
|
||||
- '**/src/**'
|
||||
branches:
|
||||
- "1.16"
|
||||
- "1.17"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Set up JDK 1.8
|
||||
uses: actions/setup-java@v1
|
||||
with:
|
||||
java-version: 1.8
|
||||
- name: Upload to Maven
|
||||
run: ./gradlew publish curseforgePublish --stacktrace
|
||||
if: |
|
||||
!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.pull_request.title, '[ci skip]')
|
||||
env:
|
||||
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
|
||||
curse_api_key: ${{ secrets.CURSE_API_KEY }}
|
||||
82
.github/workflows/push.yml
vendored
Normal file
82
.github/workflows/push.yml
vendored
Normal file
@@ -0,0 +1,82 @@
|
||||
name: Build and Release
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- '**.gradle'
|
||||
- '**.properties'
|
||||
- '**/src/**'
|
||||
branches:
|
||||
- "1.16"
|
||||
- "1.17"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
norelease:
|
||||
description: 'Do not publish'
|
||||
required: true
|
||||
default: 'false'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
java: [ 8-jdk, 11-jdk, 15-jdk ]
|
||||
runs-on: ubuntu-20.04
|
||||
container:
|
||||
image: openjdk:${{ matrix.java }}
|
||||
options: --user root
|
||||
if: |
|
||||
!contains(github.event.head_commit.message, '[ci skip]')
|
||||
steps:
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
- uses: gradle/wrapper-validation-action@v1
|
||||
- name: Build with Gradle
|
||||
run: |
|
||||
./gradlew build --stacktrace --no-daemon
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: '${{ github.event.repository.name }} Build #${{ github.run_number }}'
|
||||
path: |
|
||||
**/build/libs/
|
||||
!build/libs/
|
||||
!**/*-shadow.jar
|
||||
!**/*-transformProduction([\w]+).jar
|
||||
publish:
|
||||
needs: build
|
||||
runs-on: ubuntu-20.04
|
||||
container:
|
||||
image: openjdk:${{ matrix.java }}
|
||||
options: --user root
|
||||
if: |
|
||||
!contains(github.event.head_commit.message, '[norelease]') && github.event.inputs.norelease != 'true'
|
||||
steps:
|
||||
- uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- uses: actions/checkout@v2
|
||||
- name: Release to Maven and CurseForge
|
||||
env:
|
||||
# currently unused, may want to use these for changelogs though!
|
||||
# GIT_COMMIT: ${{ github.event.after }}
|
||||
# GIT_PREVIOUS_COMMIT: ${{ github.event.before }}
|
||||
MAVEN_PASS: ${{ secrets.MAVEN_PASS }}
|
||||
CURSE_API_KEY: ${{ secrets.CURSE_API_KEY }}
|
||||
# TODO: make this use the artifacts from the previous build step
|
||||
run: |
|
||||
./gradlew build publish curseforgePublish --stacktrace --no-daemon
|
||||
Reference in New Issue
Block a user