Skip to content

Commit f248c51

Browse files
committed
Add stage 2 alpha release workflow
1 parent 3a4a148 commit f248c51

File tree

1 file changed

+62
-4
lines changed

1 file changed

+62
-4
lines changed
Lines changed: 62 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,73 @@
1-
name: 🧪 Test Workflow for PR Label
1+
name: 🧪 Stage 2 (Alpha) Release
22

33
on:
44
pull_request:
55
types: [labeled]
66

7+
concurrency: ${{ github.workflow }}-${{ github.ref }}
8+
9+
env:
10+
CI: true
11+
712
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'
1016
runs-on: ubuntu-latest
1117
steps:
12-
- name: Log
18+
- name: Log Event Info
1319
run: |
1420
echo "Label: ${{ github.event.label.name }}"
1521
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

Comments
 (0)