Skip to content

Commit

Permalink
lets see if this works at all
Browse files Browse the repository at this point in the history
  • Loading branch information
thebehera committed Jan 7, 2024
1 parent 32db792 commit 08c3999
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 10 deletions.
61 changes: 52 additions & 9 deletions .github/workflows/merged.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
name: "Build Test and Deploy"
on:
push:
branches: [ main ]
pull_request:
paths-ignore:
- '*.md'
types:
- synchronize
- opened
jobs:
deploy:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-latest ]
create-staging-repository:
name: Create staging repository
runs-on: ubuntu-latest
outputs:
repository_id: ${{ steps.create.outputs.repository_id }}
steps:
- id: create
uses: nexus-actions/[email protected]
with:
username: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
password: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
staging_profile_id: ${{ secrets.SONATYPE_PROFILE_ID }}
base_url: https://oss.sonatype.org/service/local/staging/deploy/maven2/
description: Created by $GITHUB_WORKFLOW ($GITHUB_ACTION) for $GITHUB_REPOSITORY
macos:
needs: create-staging-repository
runs-on: macOS-latest
env:
SONATYPE_REPOSITORY_ID: ${{ needs.create_staging_repository.outputs.repository_id }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
GPG_SECRET: ${{ secrets.GPG_SECRET }}
GPG_SIGNING_PASSWORD: ${{ secrets.GPG_SIGNING_PASSWORD }}
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 19
Expand All @@ -33,8 +56,28 @@ jobs:
GPG_SECRET: ${{ secrets.GPG_SECRET }}
GPG_SIGNING_PASSWORD: ${{ secrets.GPG_SIGNING_PASSWORD }}
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
run: ./gradlew publishAllPublicationsToSonatypeRepository publish closeAndReleaseRepository
run: ./gradlew publishAllPublicationsToSonatypeRepository
- uses: actions/upload-artifact@v3
with:
name: Package
path: build/libs
path: build/libs
finalize:
runs-on: ubuntu-latest
needs: [create-staging-repository, macos]
if: ${{ always() && needs.create_staging_repository.result == 'success' }}
steps:
- name: Discard
if: ${{ needs.macos.result != 'success' }}
uses: nexus-actions/[email protected]
with:
username: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
password: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
staging_repository_id: ${{ needs.create_staging_repository.outputs.repository-id }}
- name: Release
if: ${{ needs.macos.result == 'success' }}
uses: nexus-actions/[email protected]
with:
username: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
password: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
staging_repository_id: ${{ needs.create_staging_repository.outputs.repository_id }}
close_only: true
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ kotlin.code.style=official
android.useAndroidX=true
org.gradle.jvmargs=-XX:MaxMetaspaceSize=512m
kotlin.mpp.stability.nowarn=true
libraryVersionPrefix=1.3.
libraryVersionPrefix=0.0.
libraryName=Buffer
libraryDescription=Multiplatform bytebuffer that delegates to native byte[] or ByteBuffer
publishedGroupId=com.ditchoom
Expand Down

0 comments on commit 08c3999

Please sign in to comment.