publish and release config for android icons #5
Workflow file for this run
This file contains hidden or 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: Draft publish icons android package | |
| on: | |
| push: | |
| branches: | |
| - "jp/DLT-2384-android-icons-package" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| jobs: | |
| check-dialpad-member: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # Will prevent the rest of the steps from running on fail | |
| - name: Check if user is a dialpad member | |
| uses: octokit/request-action@v2.x | |
| with: | |
| route: GET /orgs/dialpad/members/${{ github.actor }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.DIALTONE_CI_TOKEN }} | |
| publish: | |
| needs: [ check-dialpad-member ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Use pnpm | |
| uses: pnpm/action-setup@v3 | |
| with: | |
| version: 9 | |
| run_install: false | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: "${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}" | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Set up Homebrew | |
| id: set-up-homebrew | |
| uses: Homebrew/actions/setup-homebrew@master | |
| - name: Set registry to GitHub packages | |
| if: matrix.registry == 'GitHub' | |
| run: pnpm config set @dialpad:registry https://npm.pkg.github.com | |
| - name: Set ${{ matrix.registry }} auth token | |
| env: | |
| AUTH_TOKEN: ${{ matrix.registry == 'GitHub' && env.GITHUB_TOKEN || secrets.DIALTONE_NPM_TOKEN }} | |
| run: pnpm config set ${{ matrix.registry_url }}:_authToken=${{ env.AUTH_TOKEN }} | |
| # Publish Android | |
| - name: Setup Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: 17 | |
| distribution: 'temurin' | |
| cache: 'gradle' | |
| cache-dependency-path: | | |
| packages/dialtone-icons/android/*.gradle* | |
| packages/dialtone-icons/android/**/gradle-wrapper.properties | |
| - name: Build android | |
| run: pnpm nx run dialtone-icons:publish:android-package | |
| - name: Publish android - Gradle | |
| working-directory: ./packages/dialtone-icons/android | |
| env: | |
| GITHUB_USER: braddialpad | |
| run: ./gradlew publish |