Skip to content

Commit

Permalink
Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
SupremeMortal committed Oct 30, 2022
1 parent d14656e commit 8101c80
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Deploy Release
on:
push:
tags:
- '*'

jobs:
deploy:
uses: CloudburstMC/Protocol/.github/workflows/deploy.yml@3.0
with:
deploy-url: "https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/"
secrets:
DEPLOY_USERNAME: ${{ secrets.OSSRH_USERNAME }}
DEPLOY_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
PGP_SECRET: ${{ secrets.MAVEN_CENTRAL_SECRET }}
PGP_PASSPHRASE: ${{ secrets.MAVEN_CENTRAL_PASSPHRASE }}
16 changes: 16 additions & 0 deletions .github/workflows/deploy-snapshot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Deploy Snapshot
on:
push:
branches:
- '3.0'

jobs:
deploy:
uses: CloudburstMC/Protocol/.github/workflows/deploy.yml@3.0
with:
deploy-url: "https://repo.opencollab.dev/repository/maven-snapshots/"
secrets:
DEPLOY_USERNAME: ${{ secrets.OPENCOLLAB_USERNAME }}
DEPLOY_PASSWORD: ${{ secrets.OPENCOLLAB_PASSWORD }}
PGP_SECRET: ${{ secrets.MAVEN_CENTRAL_SECRET }}
PGP_PASSPHRASE: ${{ secrets.MAVEN_CENTRAL_PASSPHRASE }}
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
workflow_call:
inputs:
deploy-url:
description: 'The maven repository to deploy to'
required: true
type: string
secrets:
DEPLOY_USERNAME:
required: true
DEPLOY_PASSWORD:
required: true
PGP_SECRET:
required: true
PGP_PASSPHRASE:
required: true

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
- uses: gradle/gradle-build-action@v2
- name: Publish
env:
MAVEN_DEPLOY_USERNAME: ${{ secrets.DEPLOY_USERNAME }}
MAVEN_DEPLOY_PASSWORD: ${{ secrets.DEPLOY_PASSWORD }}
PGP_SECRET: ${{ secrets.PGP_SECRET }}
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }}
run: gradle publish

0 comments on commit 8101c80

Please sign in to comment.