Skip to content

ci: removed app reference from deployment script #542

ci: removed app reference from deployment script

ci: removed app reference from deployment script #542

name: Publish Snapshot builds
on: [pull_request]
permissions:
pull-requests: write # Write access needed to create a comment.
jobs:
publish:
name: Snapshot build and publish
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: 11
# Using branch name for name of snapshot. Makes it easy to remember and can easily trigger new builds of Remote Habits.
- name: Set snapshot version
id: set-snapshot-version
# Get the current branch name and replace all / characters with - as / is invalid in gradle names.
run: echo "::set-output name=VERSION::$(echo '${{ github.event.pull_request.head.ref }}' | sed -r 's/\//-/g')-SNAPSHOT"
- name: Publish to MavenCentral
run: ./gradlew publishReleasePublicationToSonatypeRepository
env:
OSSRH_USERNAME: ${{ secrets.GRADLE_PUBLISH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.GRADLE_PUBLISH_PASSWORD }}
SIGNING_KEY_ID: ${{ secrets.GRADLE_SIGNING_KEYID }}
SIGNING_PASSWORD: ${{ secrets.GRADLE_SIGNING_PASSPHRASE }}
SIGNING_KEY: ${{ secrets.GRADLE_SIGNING_PRIVATE_KEY }}
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }}
MODULE_VERSION: ${{ steps.set-snapshot-version.outputs.VERSION }}
SNAPSHOT: true
- name: Find old comment to update comment for
uses: peter-evans/find-comment@v2
id: find-previous-comment
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Build available to test
- name: Inform pull request on build of SDK available to test
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.find-previous-comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
Build available to test
Version: `${{ steps.set-snapshot-version.outputs.VERSION }}`
Repository: `https://s01.oss.sonatype.org/content/repositories/snapshots/`
edit-mode: replace
token: ${{ secrets.GITHUB_TOKEN }}