Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move experimental releases to a manually triggered workflow #9082

Merged
merged 1 commit into from Mar 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/nightly.yml
Expand Up @@ -49,10 +49,7 @@ jobs:
- name: 🕵️ Check for changes
id: version
run: |
# get latest commit sha
SHA=$(git rev-parse HEAD)
# get first 7 characters of sha
SHORT_SHA=${SHA::7}
SHORT_SHA=$(git rev-parse --short HEAD)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Slightly easier way to do this stolen from our version.js script - results in a 9 char SHA instead of 7.


# get latest nightly tag
LATEST_NIGHTLY_TAG=$(git tag -l v0.0.0-nightly-\* --sort=-creatordate | head -n 1)
Expand Down
59 changes: 59 additions & 0 deletions .github/workflows/release-experimental-dispatch.yml
@@ -0,0 +1,59 @@
name: 🧪 Experimental Release
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a copy of the nightly.yml file with required changes for experimentals


on:
workflow_dispatch:
inputs:
branch:
required: true
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't run this without specifying the branch to checkout and build from


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
67 changes: 0 additions & 67 deletions .github/workflows/release-experimental.yml

This file was deleted.