[WIP] Upgrade to [email protected] #160
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: Build-Pipeline | |
on: [ push, pull_request ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'zulu' | |
- name: Configure Sonar-Analysis | |
run: | | |
. ./.github/configureSonarAnalysis.sh | |
- name: Build and check library | |
uses: christopherfrieler/gradle-wrapper-action@feature/modernize | |
env: | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
with: | |
arguments: | | |
lintRelease testReleaseUnitTest sonar | |
generatePomFileForMavenPublication assembleRelease kdocJar sourcesJar | |
artifacts: | | |
lint-report android-beans/build/reports/lint-results-release.* | |
test-report android-beans/build/reports/tests/testReleaseUnitTest/**/* | |
pom android-beans/build/publications/maven/pom-default.xml | |
aar android-beans/build/outputs/aar/android-beans-*.aar | |
kdoc android-beans/build/libs/android-beans-*-kdoc.jar | |
sources android-beans/build/libs/android-beans-*-sources.jar | |
deploy: | |
if: startsWith(github.ref, 'refs/tags/') | |
needs: ['build'] | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'zulu' | |
- name: Prepare signing-key file | |
env: | |
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | |
SIGNING_KEY_BASE64: ${{ secrets.SIGNING_KEY_BASE64 }} | |
run: echo $SIGNING_KEY_BASE64 | base64 -d > "$SIGNING_KEY_ID.gpg" | |
- name: Deploy to mavencentral | |
uses: christopherfrieler/gradle-wrapper-action@feature/modernize | |
env: | |
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }} | |
SIGNING_KEY_PASSWORD: ${{ secrets.SIGNING_KEY_PASSWORD }} | |
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} | |
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} | |
SONATYPE_STAGING_PROFILE_ID: ${{ secrets.SONATYPE_STAGING_PROFILE_ID }} | |
with: | |
arguments: publishToSonatype closeAndReleaseSonatypeStagingRepository | |
- name: Prepare release info | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ github.ref }} | |
name: ${{ github.ref }} | |
body: 'TODO: write changelog for this version!' | |
draft: true | |
token: ${{ secrets.GITHUB_TOKEN }} |