feat(sqlite-storage): scaffold workspace #12
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: Default storage | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
changes: | |
name: report changed files | |
runs-on: ubuntu-latest | |
outputs: | |
changed: ${{ steps.filter.outputs.storage }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
token: ${{ secrets.GH_RELEASE_TOKEN }} | |
filters: | | |
storage: | |
- 'packages/default-storage/**' | |
android: | |
name: Android | |
needs: changes | |
if: ${{ needs.changes.outputs.changed == 'true' }} | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup project | |
uses: ./.github/actions/setup-project | |
- name: Install JS dependencies | |
run: | | |
yarn | |
- name: Test Next Storage | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: wrapper | |
arguments: react-native-async-storage_async-storage:test | |
build-root-directory: packages/default-storage/example/android | |
- name: Build e2e binary | |
run: | | |
yarn build:e2e:android | |
working-directory: packages/default-storage | |
ios: | |
name: iOS | |
needs: changes | |
if: ${{ needs.changes.outputs.changed == 'true' }} | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup project | |
uses: ./.github/actions/setup-project | |
- name: Cache /.ccache | |
uses: actions/cache@v3 | |
with: | |
path: packages/default-storage/.ccache | |
key: ccache-ios-${{ hashFiles('yarn.lock') }} | |
restore-keys: ccache-ios- | |
- name: Install JS dependencies | |
run: | | |
yarn | |
- name: Bundle JS | |
run: | | |
yarn bundle:ios | |
working-directory: packages/default-storage | |
- name: Install Pods | |
run: | | |
RCT_NEW_ARCH_ENABLED=1 pod install | |
working-directory: packages/default-storage/example/ios | |
- name: Build e2e binary | |
run: | | |
yarn build:e2e:ios | |
working-directory: packages/default-storage | |
macos: | |
name: macOS | |
needs: changes | |
if: ${{ needs.changes.outputs.changed == 'true' }} | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup project | |
uses: ./.github/actions/setup-project | |
- name: Cache /.ccache | |
uses: actions/cache@v3 | |
with: | |
path: packages/default-storage/.ccache | |
key: ccache-macos-${{ hashFiles('yarn.lock') }} | |
restore-keys: ccache-macos- | |
- name: Install JS dependencies | |
run: | | |
yarn | |
- name: Bundle JS | |
run: | | |
yarn bundle:macos | |
working-directory: packages/default-storage | |
- name: Install Pods | |
run: | | |
RCT_NEW_ARCH_ENABLED=1 pod install | |
working-directory: packages/default-storage/example/macos | |
- name: Build | |
run: | | |
yarn build:e2e:macos | |
working-directory: packages/default-storage | |
- name: Test | |
if: false | |
run: | | |
yarn test:e2e:macos | |
working-directory: packages/default-storage | |
windows: | |
name: Windows | |
needs: changes | |
if: ${{ needs.changes.outputs.changed == 'true' }} | |
runs-on: windows-2022 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup project | |
uses: ./.github/actions/setup-project | |
with: | |
windows-fix: true | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ inputs.node-version }} | |
cache: "yarn" | |
- name: Enable corepack | |
shell: bash | |
run: | | |
corepack enable | |
yarn --version | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ inputs.node-version }} | |
cache: "yarn" | |
- name: Set up MSBuild | |
uses: microsoft/[email protected] | |
- name: Setup VSTest.console.exe | |
uses: darenm/[email protected] | |
- name: Install JS dependencies | |
run: | | |
yarn | |
- name: Install Windows test app | |
run: | | |
yarn install-windows-test-app -p example/windows | |
working-directory: packages/default-storage | |
- name: Build | |
run: | | |
yarn react-native run-windows --release --arch x64 --logging --no-packager --no-launch --no-deploy --msbuildprops "BundleEntryFile=index.ts" --no-telemetry | |
working-directory: packages/default-storage | |
release: | |
name: Release | |
needs: [android, ios, macos, windows] | |
if: github.event_name == 'push' | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Setup project | |
uses: ./.github/actions/setup-project | |
- name: Install JS dependencies | |
run: | | |
yarn | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }} | |
GIT_AUTHOR_EMAIL: ${{ secrets.GH_BOT_EMAIL }} | |
GIT_AUTHOR_NAME: ${{ secrets.GH_BOT_NAME }} | |
GIT_COMMITTER_EMAIL: ${{ secrets.GH_BOT_EMAIL }} | |
GIT_COMMITTER_NAME: ${{ secrets.GH_BOT_NAME }} | |
NPM_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }} | |
run: | | |
git config user.email ${{ secrets.GH_BOT_EMAIL }} | |
git config user.name ${{ secrets.GH_BOT_NAME }} | |
yarn semantic-release | |
working-directory: packages/default-storage |