Configure Sonatype Nexus Username #23
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: Release cucumber-android | |
on: | |
push: | |
branches: | |
- release/* | |
jobs: | |
publish: | |
name: Publish cucumber-android | |
runs-on: macos-13 | |
environment: Release | |
steps: | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- uses: actions/checkout@v2 | |
- name: Check commit has been pushed on origin/main | |
run: | | |
git fetch --quiet origin main | |
git merge-base --is-ancestor HEAD origin/main | |
- name: Build the app | |
run: ./gradlew build --stacktrace -x lint | |
- name: run tests | |
uses: ./.github/actions/android-test | |
- name: Publish | |
uses: ./.github/actions/action-publish-gradle | |
with: | |
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }} | |
gpg-passphrase: ${{ secrets.GPG_PASSPHRASE }} | |
nexus-username: ${{ secrets.SONATYPE_USERNAME }} | |
nexus-password: ${{ secrets.SONATYPE_PASSWORD }} | |
create-github-release: | |
name: Create GitHub Release and Git tag | |
needs: publish | |
runs-on: ubuntu-latest | |
environment: Release | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: cucumber/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} |