Sync and publish to opencollab repo #130
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/Fork-Sync-With-Upstream-action@v3.4.1 | |
with: | |
target_sync_branch: master | |
target_repo_token: ${{ secrets.GITHUB_TOKEN }} | |
upstream_sync_repo: SpigotMC/BungeeCord | |
upstream_sync_branch: master | |
test_mode: ${{ inputs.sync_test_mode }} | |
- uses: actions/setup-java@v4 | |
if: steps.sync.outputs.has_new_commits == 'true' | |
with: | |
java-version: 8 | |
distribution: zulu | |
server-id: opencollab | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
- name: Publish package | |
if: steps.sync.outputs.has_new_commits == 'true' | |
run: mvn --batch-mode deploy | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
MAVEN_USERNAME: ${{ vars.DEPLOY_USER }} | |
MAVEN_PASSWORD: ${{ secrets.DEPLOY_PASS }} |