Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto sync daily and publish to opencollab repo
Browse files Browse the repository at this point in the history
(cherry picked from commit ac693f1)
Tim203 committed May 10, 2024

Unverified

This user has not yet uploaded their public signing key.
1 parent 1228f14 commit 7b0adf9
Showing 4 changed files with 48 additions and 24 deletions.
22 changes: 0 additions & 22 deletions .github/workflows/gradle.yml

This file was deleted.

45 changes: 45 additions & 0 deletions .github/workflows/sync-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Sync and publish to opencollab repo

on:
schedule:
- cron: '1 18 * * *'
workflow_dispatch:
inputs:
sync_test_mode:
description: 'Test fork sync config'
type: boolean
default: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Sync upstream changes
id: sync
uses: aormsby/[email protected]
with:
target_sync_branch: main
target_repo_token: ${{ secrets.GITHUB_TOKEN }}
upstream_sync_repo: PaperMC/Velocity
upstream_sync_branch: dev/3.0.0
test_mode: ${{ inputs.sync_test_mode }}
- uses: actions/setup-java@v4
if: steps.sync.outputs.has_new_commits == 'true'
with:
java-version: 17
distribution: temurin
server-id: opencollab
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Setup Gradle
if: steps.sync.outputs.has_new_commits == 'true'
uses: gradle/actions/setup-gradle@v3
with:
validate-wrappers: true
- name: Publish to Maven Repository
if: steps.sync.outputs.has_new_commits == 'true'
run: gradlew publish
env:
ORG_GRADLE_PROJECT_geysermcUsername: ${{ vars.DEPLOY_USER }}
ORG_GRADLE_PROJECT_geysermcPassword: ${{ secrets.DEPLOY_PASS }}
4 changes: 2 additions & 2 deletions build-logic/src/main/kotlin/velocity-publish.gradle.kts
Original file line number Diff line number Diff line change
@@ -8,8 +8,8 @@ extensions.configure<PublishingExtension> {
maven {
credentials(PasswordCredentials::class.java)

name = "paper"
val base = "https://repo.papermc.io/repository/maven"
name = "geysermc"
val base = "https://repo.opencollab.dev/maven"
val releasesRepoUrl = "$base-releases/"
val snapshotsRepoUrl = "$base-snapshots/"
setUrl(if (version.toString().endsWith("SNAPSHOT")) snapshotsRepoUrl else releasesRepoUrl)
1 change: 1 addition & 0 deletions proxy/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ plugins {
application
id("velocity-init-manifest")
alias(libs.plugins.shadow)
id("velocity-publish")
}

application {

0 comments on commit 7b0adf9

Please sign in to comment.