feat: add auto release and preview ci #1
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: EAS Build and Release | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
env: | |
build: development | |
jobs: | |
build-ios: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
cache: npm | |
- name: Setup Expo and EAS | |
uses: expo/expo-github-action@v8 | |
with: | |
eas-version: latest | |
token: ${{ secrets.EXPO_TOKEN }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Build on Locally | |
run: eas build --profile $build --platform ios --non-interactive --no-wait --local | |
- name: Upload ios build artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: casdoor-app-ios | |
path: dist/*.dmg | |
build-android: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 18.x | |
cache: npm | |
- name: Setup Expo and EAS | |
uses: expo/expo-github-action@v8 | |
with: | |
eas-version: latest | |
token: ${{ secrets.EXPO_TOKEN }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Build on Locally | |
run: eas build --profile $build --platform android --non-interactive --no-wait --local | |
- name: Upload android build artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: casdoor-app-android | |
path: dist/*.dmg | |
semantic-release: | |
needs: [build-android, build-ios] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run semantic-release | |
run: | | |
npm install --save-dev [email protected] | |
npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |