mirror of
https://github.com/zhigang1992/nativewind.git
synced 2026-06-15 02:09:06 +08:00
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
name: GitHub Actions Vercel Preview Deployment
|
|
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- main
|
|
- renovate/*
|
|
|
|
jobs:
|
|
Publish-Preview:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
version: ${{ steps.version.outputs.version }}
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v3
|
|
- name: Setup Node.js 16.x
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: "16"
|
|
cache: "npm"
|
|
registry-url: "https://registry.npmjs.org"
|
|
- name: Install Dependencies
|
|
run: npm install
|
|
- name: Build project
|
|
run: npm run build
|
|
- name: Test project
|
|
run: npm test
|
|
- name: Copy readme
|
|
run: cp README.md packages/nativewind/
|
|
- name: Version
|
|
id: version
|
|
working-directory: ./packages/nativewind
|
|
run: npm version prerelease --preid $(git describe --tags --always) --no-git-tag-version && echo "version=$(jq -r .version package.json)" >> $GITHUB_OUTPUT
|
|
- name: Publish
|
|
working-directory: ./packages/nativewind
|
|
run: npm publish --tag preview
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
Snackager:
|
|
runs-on: ubuntu-latest
|
|
needs: [Publish-Preview]
|
|
steps:
|
|
- name: Update Snackager
|
|
run: sleep 45 && curl "https://snackager.expo.io/bundle/nativewind@${{ needs.Publish-Preview.outputs.version }}?platforms=ios,android,web&version_snackager=true&bypassCache=true" --retry 5
|