Publish @vercel/remix-run-dev #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish @vercel/remix-run-dev | |
on: | |
workflow_dispatch: | |
inputs: | |
version-postfix: | |
type: string | |
description: "Optional version postfix to be added onto the end of the @vercel/remix-run-dev version. Example: `patch.1` will become: `1.13.0-patch.1`" | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup node | |
uses: actions/setup-node@v3 | |
with: | |
registry-url: "https://registry.npmjs.org" | |
node-version-file: ".nvmrc" | |
cache: "yarn" | |
- name: Install | |
run: yarn --frozen-lockfile | |
- name: Build | |
run : yarn build:vercel | |
- name: Update package | |
id: update-package | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.GH_TOKEN_PULL_REQUESTS }} | |
script: | | |
const script = require('./.github/workflow_scripts/update-package.js'); | |
return await script({ github, context }, "${{ inputs.version-postfix }}"); | |
- name: Publish @vercel/remix | |
run: cd packages/vercel-remix && npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }} | |
- name: Publish @vercel/remix-run-dev | |
run: cd packages/remix-dev && npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN_ELEVATED }} | |
- name: Trigger update workflow on "vercel/vercel" | |
uses: actions/github-script@v6 | |
with: | |
github-token: ${{ secrets.GH_TOKEN_PULL_REQUESTS }} | |
script: | | |
const script = require('./.github/workflow_scripts/trigger-builder-update.js'); | |
await script({ github, context }, ${{ steps.update-package.outputs.result }}); |