diff --git a/.github/workflows/release-experimental-dispatch.yml b/.github/workflows/release-experimental-dispatch.yml new file mode 100644 index 00000000000..5e636c792af --- /dev/null +++ b/.github/workflows/release-experimental-dispatch.yml @@ -0,0 +1,59 @@ +name: ๐Ÿงช Experimental Release + +on: + workflow_dispatch: + inputs: + branch: + required: true + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +env: + CI: true + +jobs: + experimental: + name: ๐Ÿงช Experimental Release + if: github.repository == 'remix-run/remix' + runs-on: ubuntu-latest + steps: + - name: โฌ‡๏ธ Checkout repo + uses: actions/checkout@v4 + with: + ref: ${{ github.event.inputs.branch }} + # checkout using a custom token so that we can push later on + token: ${{ secrets.NIGHTLY_PAT }} + fetch-depth: 0 + + - name: ๐Ÿ“ฆ Setup pnpm + uses: pnpm/action-setup@v3.0.0 + + - name: โŽ” Setup node + uses: actions/setup-node@v4 + with: + node-version-file: ".nvmrc" + cache: "pnpm" + + - name: ๐Ÿ“ฅ Install deps + run: pnpm install --frozen-lockfile + + - name: โคด๏ธ Update version + run: | + git config --local user.email "hello@remix.run" + git config --local user.name "Remix Run Bot" + SHORT_SHA=$(git rev-parse --short HEAD) + NEXT_VERSION=0.0.0-experimental-${SHORT_SHA} + git checkout -b experimental/${NEXT_VERSION} + pnpm run version ${NEXT_VERSION} --skip-prompt + git push origin --tags + + - name: ๐Ÿ— Build + run: pnpm build + + - name: ๐Ÿ” Setup npm auth + run: | + echo "registry=https://registry.npmjs.org" >> ~/.npmrc + echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc + + - name: ๐Ÿš€ Publish + run: npm run publish