name: Build & Publish

on:
  push:
    branches: [ master ]

env:
  MAJOR_VERSION: 2
  MINOR_VERSION: 1

jobs:
  build:
    name: Build and run tests
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: set up JDK 11
        uses: actions/setup-java@v2
        with:
          java-version: '11'
          distribution: 'temurin'
          cache: gradle

      - name: Grant execute permission for gradlew
        run: chmod +x gradlew
      - name: Build with Gradle
        run: ./gradlew build
      - name: Upload Reports
        uses: actions/upload-artifact@v2.3.1
        with:
          name: reports
          path: build/report
      - name: Upload Android Archive
        uses: actions/upload-artifact@v2.3.1
        with:
          name: android-permissions-release-${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ env.GITHUB_RUN_NUMBER }}.aar
          path: build/outputs/aar/android-permissions-release.aar

name: Build & Publish

on:
  push:
    branches: [ master ]

env:
  MAJOR_VERSION: 2
  MINOR_VERSION: 1

jobs:
  build:
    name: Build and run tests
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v2
      - name: set up JDK 11
        uses: actions/setup-java@v2
        with:
          java-version: '11'
          distribution: 'temurin'
          cache: gradle

      - name: Grant execute permission for gradlew
        run: chmod +x gradlew
      - name: Build with Gradle
        run: ./gradlew build
      - name: Upload Reports
        uses: actions/upload-artifact@v2.3.1
        with:
          name: reports
          path: build/report
      - name: Upload Android Archive
        uses: actions/upload-artifact@v2.3.1
        with:
          name: android-permissions-release-${{ env.MAJOR_VERSION }}.${{ env.MINOR_VERSION }}.${{ github.run_number }}.aar
          path: build/outputs/aar/android-permissions-release.aar

Access github run number from context.
Access github run number from context.



Co-authored-by: Shubhamay Das <94ef4642f61bdd79312e138ef5e2f32809618ded@gmail.com>