Skip to content

Commit 39b87d1

Browse files
committed
draft yml
1 parent 125f338 commit 39b87d1

File tree

1 file changed

+86
-0
lines changed

1 file changed

+86
-0
lines changed
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Draft publish icons android package
2+
3+
on:
4+
workflow_dispatch:
5+
6+
env:
7+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8+
9+
jobs:
10+
check-dialpad-member:
11+
runs-on: ubuntu-latest
12+
steps:
13+
# Will prevent the rest of the steps from running on fail
14+
- name: Check if user is a dialpad member
15+
uses: octokit/request-action@v2.x
16+
with:
17+
route: GET /orgs/dialpad/members/${{ github.actor }}
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.DIALTONE_CI_TOKEN }}
20+
21+
publish:
22+
needs: [ check-dialpad-member ]
23+
runs-on: ubuntu-latest
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Use Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 22
32+
33+
- name: Use pnpm
34+
uses: pnpm/action-setup@v3
35+
with:
36+
version: 9
37+
run_install: false
38+
39+
- name: Get pnpm store directory
40+
shell: bash
41+
run: |
42+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
43+
44+
- name: Setup pnpm cache
45+
uses: actions/cache@v4
46+
with:
47+
path: ${{ env.STORE_PATH }}
48+
key: "${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}"
49+
restore-keys: |
50+
${{ runner.os }}-pnpm-store-
51+
52+
- name: Install dependencies
53+
run: pnpm install --frozen-lockfile
54+
55+
- name: Set up Homebrew
56+
id: set-up-homebrew
57+
uses: Homebrew/actions/setup-homebrew@master
58+
59+
- name: Set registry to GitHub packages
60+
if: matrix.registry == 'GitHub'
61+
run: pnpm config set @dialpad:registry https://npm.pkg.github.com
62+
63+
- name: Set ${{ matrix.registry }} auth token
64+
env:
65+
AUTH_TOKEN: ${{ matrix.registry == 'GitHub' && env.GITHUB_TOKEN || secrets.DIALTONE_NPM_TOKEN }}
66+
run: pnpm config set ${{ matrix.registry_url }}:_authToken=${{ env.AUTH_TOKEN }}
67+
68+
# Publish Android
69+
- name: Setup Java
70+
uses: actions/setup-java@v4
71+
with:
72+
java-version: 17
73+
distribution: 'temurin'
74+
cache: 'gradle'
75+
cache-dependency-path: |
76+
packages/dialtone-icons/android/*.gradle*
77+
packages/dialtone-icons/android/**/gradle-wrapper.properties
78+
79+
- name: Build android
80+
run: pnpm nx run dialtone-icons:publish:android-package
81+
82+
- name: Publish android - Gradle
83+
working-directory: ./packages/dialtone-icons/android
84+
env:
85+
GITHUB_USER: braddialpad
86+
run: ./gradlew publish

0 commit comments

Comments
 (0)