Skip to content

Commit

Permalink
Move to actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Matyrobbrt committed Oct 30, 2023
1 parent 2303b34 commit bfbbe9a
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 270 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build-prs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build and test PRs

on:
pull_request:
types:
- synchronize
- opened
- ready_for_review
- reopened

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1000
fetch-tags: true

- name: Setup JDK 17
uses: actions/setup-java@v2
with:
java-version: '17'
distribution: 'temurin'

- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build
25 changes: 25 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Release

on:
push:
branches: [ "main" ]

permissions:
contents: read
statuses: write

jobs:
build:
uses: neoforged/actions/.github/workflows/gradle-publish.yml@main
with:
java: 17
pre_gradle_tasks: ':test'
gradle_tasks: ':publish'
secrets:
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}

MAVEN_USER: ${{ secrets.MAVEN_USER }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}

GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_KEY_PASSWORD: ${{ secrets.GPG_KEY_PASSWORD }}
104 changes: 0 additions & 104 deletions .teamcity/pom.xml

This file was deleted.

71 changes: 0 additions & 71 deletions .teamcity/settings.kts

This file was deleted.

85 changes: 0 additions & 85 deletions Jenkinsfile

This file was deleted.

30 changes: 20 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ plugins {
id 'com.github.ben-manes.versions' version '0.39.0'
id 'antlr'
id 'net.neoforged.gradleutils' version '2.+'
id 'signing'
}

apply plugin: 'maven-publish'
Expand Down Expand Up @@ -43,23 +44,17 @@ jar.manifest = manifest {
'Specification-Vendor': 'neoforged',
'Specification-Version': '1', // Currently version 1 of the accesstransformer specification
'Implementation-Title': project.name,
'Implementation-Version': "${project.version}+${System.getenv('BUILD_NUMBER')?:0}+${gradleutils.gitInfo.branch}.${gradleutils.gitInfo.abbreviatedId}",
'Implementation-Version': "${project.version}+${gradleutils.gitInfo.abbreviatedId}",
'Implementation-Vendor': 'neoforged',
'Implementation-Timestamp': java.time.Instant.now().toString(),
'Git-Commit': gradleutils.gitInfo.abbreviatedId,
'Git-Branch': gradleutils.gitInfo.branch,
'Build-Number': "${System.getenv('BUILD_NUMBER')?:0}" ],
'Git-Commit': gradleutils.gitInfo.abbreviatedId],
'net/neoforged/accesstransformer/service/')
attributes(['Specification-Title': 'accesstransformers',
'Specification-Vendor': 'neoforged',
'Specification-Version': '1', // Currently version 1 of the accesstransformer specification
'Implementation-Title': project.name,
'Implementation-Version': "${project.version}+${System.getenv('BUILD_NUMBER')?:0}+${gradleutils.gitInfo.branch}.${gradleutils.gitInfo.abbreviatedId}",
'Implementation-Version': "${project.version}+${gradleutils.gitInfo.abbreviatedId}",
'Implementation-Vendor': 'neoforged',
'Implementation-Timestamp': java.time.Instant.now().toString(),
'Git-Commit': gradleutils.gitInfo.abbreviatedId,
'Git-Branch': gradleutils.gitInfo.branch,
'Build-Number': "${System.getenv('BUILD_NUMBER')?:0}" ],
'Git-Commit': gradleutils.gitInfo.abbreviatedId],
'net/neoforged/accesstransformer/')
}

Expand Down Expand Up @@ -172,6 +167,15 @@ artifacts {
archives shadowJar
}

if (System.getenv('GPG_PRIVATE_KEY')) {
signing {
final signingKey = System.getenv('GPG_PRIVATE_KEY') ?: ''
final signingPassword = System.getenv('GPG_KEY_PASSWORD') ?: ''
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}
}

publishing {
publications {
mavenJava(MavenPublication) {
Expand Down Expand Up @@ -208,6 +212,12 @@ publishing {
id = 'DemonWav'
name = 'DemonWav'
}
developer {
id = 'neoforged'
name = 'NeoForged'
email = 'contact@neoforged.net'
url = 'https://github.com/NeoForged/'
}
}
}
}
Expand Down

0 comments on commit bfbbe9a

Please sign in to comment.