This repository has been archived by the owner on Feb 22, 2024. It is now read-only.
gh-action: bump github/codeql-action from 2 to 3 #67
Workflow file for this run
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: Publish | |
on: | |
pull_request: | |
branches: | |
- main | |
types: | |
- closed | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
publish: | |
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'release/') | |
runs-on: ubuntu-latest | |
environment: Production | |
steps: | |
- name: 'Checkout' | |
uses: actions/checkout@v4 | |
- name: Set up Java | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'adopt' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Validate Gradle Wrapper | |
uses: gradle/wrapper-validation-action@v1 | |
- name: Assemble AAR | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: assemble | |
env: | |
GITHUB_USER: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: "Publish AAR" | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: publish | |
env: | |
OSSRH_USER: ${{ secrets.OSSRH_USER }} | |
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} | |
GITHUB_USER: ${{ github.actor }} | |
GITHUB_TOKEN: ${{ github.token }} | |
PGP_PASSPHRASE: ${{ secrets.PGP_PASSPHRASE }} | |
PGP_PRIVATE_KEY: ${{ secrets.PGP_PRIVATE_KEY }} | |
- name: Get Version | |
id: semver | |
uses: ietf-tools/semver-action@v1 | |
with: | |
token: ${{ github.token }} | |
- name: Release | |
uses: ncipollo/release-action@v1 | |
with: | |
tag: ${{ steps.semver.outputs.nextStrict }} | |
- name: "Get Staging Profile Id" | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: getStagingProfile | |
env: | |
OSSRH_USER: ${{ secrets.OSSRH_USER }} | |
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} | |
- name: "Close and release to Maven Central" | |
uses: gradle/gradle-build-action@v2 | |
with: | |
arguments: closeAndReleaseRepository | |
env: | |
OSSRH_USER: ${{ secrets.OSSRH_USER }} | |
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }} |