Skip to content

Start prerelease

Start prerelease #1066

Workflow file for this run

name: 🦋 Changesets Release
on:
push:
branches:
- release
- "release-*"
- "!release-experimental"
- "!release-experimental-*"
- "!release-manual"
- "!release-manual-*"
jobs:
release:
name: 🦋 Changesets Release
# we need to check for `nightly` refs and skip them as we dont want to
# double publish a version as it would fail. unfortunately even using curl
# and a `repository_dispatch` trigger, actions still aren't ran if a version
# is published using the default secrets.GITHUB_TOKEN.
if: |
github.repository == 'remix-run/remix' &&
!contains(github.ref, 'nightly')
runs-on: ubuntu-latest
outputs:
published_packages: ${{ steps.changesets.outputs.publishedPackages }}
published: ${{ steps.changesets.outputs.published }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 📦 Setup pnpm
uses: pnpm/[email protected]
- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- name: 📥 Install deps
run: pnpm install --frozen-lockfile
- name: 🔐 Setup npm auth
run: |
echo "registry=https://registry.npmjs.org" >> ~/.npmrc
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
# This action has two responsibilities. The first time the workflow runs
# (initial push to a `release-*` branch) it will create a new branch and
# then open a PR with the related changes for the new version. After the
# PR is merged, the workflow will run again and this action will build +
# publish to npm.
- name: 🚀 PR / Publish
id: changesets
uses: changesets/action@v1
with:
version: pnpm run changeset:version
commit: "chore: Update version for release"
title: "chore: Update version for release"
publish: pnpm run changeset:release
createGithubReleases: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
find_package_version:
name: 🦋 Find Package
needs: [release]
runs-on: ubuntu-latest
if: github.repository == 'remix-run/remix' && needs.release.outputs.published == 'true'
outputs:
package_version: ${{ steps.find_package_version.outputs.package_version }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: 📦 Setup pnpm
uses: pnpm/[email protected]
- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
- id: find_package_version
run: |
package_version=$(node ./scripts/find-release-from-changeset.js)
echo "package_version=${package_version}" >> $GITHUB_OUTPUT
env:
PACKAGE_VERSION_TO_FOLLOW: "remix"
PUBLISHED_PACKAGES: ${{ needs.release.outputs.published_packages }}
comment:
name: 📝 Comment on related issues and pull requests
if: github.repository == 'remix-run/remix' && needs.find_package_version.outputs.package_version != ''
needs: [release, find_package_version]
uses: ./.github/workflows/release-comments.yml
# deployments:
# name: 🚀 Deployment Tests
# if: github.repository == 'remix-run/remix'
# needs: [release, find_package_version]
# uses: ./.github/workflows/deployments.yml
# secrets:
# TEST_AWS_ACCESS_KEY_ID: ${{ secrets.TEST_AWS_ACCESS_KEY_ID }}
# TEST_AWS_SECRET_ACCESS_KEY: ${{ secrets.TEST_AWS_SECRET_ACCESS_KEY }}
# TEST_CF_ACCOUNT_ID: ${{ secrets.TEST_CF_ACCOUNT_ID }}
# TEST_CF_GLOBAL_API_KEY: ${{ secrets.TEST_CF_GLOBAL_API_KEY }}
# TEST_CF_EMAIL: ${{ secrets.TEST_CF_EMAIL }}
# TEST_CF_PAGES_API_TOKEN: ${{ secrets.TEST_CF_PAGES_API_TOKEN }}
# TEST_CF_API_TOKEN: ${{ secrets.TEST_CF_API_TOKEN }}
# TEST_DENO_DEPLOY_TOKEN: ${{ secrets.TEST_DENO_DEPLOY_TOKEN }}
# TEST_FLY_TOKEN: ${{ secrets.TEST_FLY_TOKEN }}
# stacks:
# name: 🥞 Remix Stacks Test
# if: github.repository == 'remix-run/remix'
# needs: [release, find_package_version]
# uses: ./.github/workflows/stacks.yml
# with:
# version: ${{ needs.find_package_version.outputs.package_version }}