|
1 |
| -name: 🧪 Test Workflow for PR Label |
| 1 | +name: 🧪 Stage 2 (Alpha) Release |
2 | 2 |
|
3 | 3 | on:
|
4 | 4 | pull_request:
|
5 | 5 | types: [labeled]
|
6 | 6 |
|
| 7 | +concurrency: ${{ github.workflow }}-${{ github.ref }} |
| 8 | + |
| 9 | +env: |
| 10 | + CI: true |
| 11 | + |
7 | 12 | jobs:
|
8 |
| - test: |
9 |
| - name: Test |
| 13 | + alpha: |
| 14 | + name: 🧪 Alpha Release |
| 15 | + if: github.repository == 'remix-run/react-router' && github.event.label.name == 'alpha-release' |
10 | 16 | runs-on: ubuntu-latest
|
11 | 17 | steps:
|
12 |
| - - name: Log |
| 18 | + - name: Log Event Info |
13 | 19 | run: |
|
14 | 20 | echo "Label: ${{ github.event.label.name }}"
|
15 | 21 | echo "Branch: ${{ github.event.pull_request.head.ref }}"
|
| 22 | + echo "SHA: ${{ github.event.pull_request.head.sha }}" |
| 23 | +
|
| 24 | + - name: ⬇️ Checkout repo |
| 25 | + uses: actions/checkout@v4 |
| 26 | + with: |
| 27 | + ref: ${{ github.event.pull_request.head.sha }} |
| 28 | + |
| 29 | + - name: Log Git Info |
| 30 | + run: | |
| 31 | + git log -n 1 |
| 32 | + git status |
| 33 | +
|
| 34 | + - name: 📦 Setup pnpm |
| 35 | + uses: pnpm/action-setup@v4 |
| 36 | + |
| 37 | + - name: ⎔ Setup node |
| 38 | + uses: actions/setup-node@v4 |
| 39 | + with: |
| 40 | + node-version-file: ".nvmrc" |
| 41 | + cache: "pnpm" |
| 42 | + |
| 43 | + - name: 📥 Install deps |
| 44 | + run: pnpm install --frozen-lockfile |
| 45 | + |
| 46 | + - name: ⤴️ Update version |
| 47 | + id: version |
| 48 | + run: | |
| 49 | + SHORT_SHA=$(git rev-parse --short HEAD) |
| 50 | + NEXT_VERSION=0.0.0-alpha-${SHORT_SHA} |
| 51 | + git checkout -b alpha/${NEXT_VERSION} |
| 52 | + pnpm run version ${NEXT_VERSION} |
| 53 | + echo "version=${NEXT_VERSION}" >> "$GITHUB_OUTPUT" |
| 54 | +
|
| 55 | + - name: 🏗 Build |
| 56 | + run: pnpm build |
| 57 | + |
| 58 | + - name: Check |
| 59 | + run: | |
| 60 | + echo "Version: ${{ steps.version.outputs.version }}" |
| 61 | + git status |
| 62 | + cat packages/react-router/package.json |
| 63 | + cat packages/react-router-dev/package.json |
| 64 | + ls packages/react-router/dist |
| 65 | + ls packages/react-router-dev/dist |
| 66 | +
|
| 67 | + # - name: 🔐 Setup npm auth |
| 68 | + # run: | |
| 69 | + # echo "registry=https://registry.npmjs.org" >> ~/.npmrc |
| 70 | + # echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc |
| 71 | + |
| 72 | + # - name: 🚀 Publish |
| 73 | + # run: pnpm run publish |
0 commit comments