Skip to content

0. Release > Promote LTS #1

0. Release > Promote LTS

0. Release > Promote LTS #1

name: 0. Release > Promote LTS
on:
workflow_dispatch:
inputs:
version:
description: 'The existing version to promote (e.g. `4.0.0`)'
type: string
channel:
description: 'The NPM Distribution Tag (e.g. `lts` or `lts-4-8`)'
type: string
update-branch:
description: 'Whether to update the associated LTS branch to the same commit as the tag'
default: true
type: boolean
env:
TURBO_API: http://127.0.0.1:9080
TURBO_TOKEN: this-is-not-a-secret
TURBO_TEAM: myself
jobs:
release:
name: Run Release Script
runs-on: ubuntu-latest
environment: deployment
steps:
- name: Enforce Branch
# Note: we always checkout main in actions/checkout, but this enforces
# good hygiene.
if: github.ref != 'refs/heads/main'
run: |
echo "Releases may only be performed from the main branch."
exit 1
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
fetch-depth: 1
fetch-tags: true
show-progress: false
token: ${{ secrets.GH_DEPLOY_TOKEN }}
- uses: ./.github/actions/setup
with:
install: true
repo-token: ${{ secrets.GH_DEPLOY_TOKEN }}
- name: Make sure git user is setup
run: |
git config --local user.email ${{ secrets.GH_DEPLOY_EMAIL }}
git config --local user.name ${{ secrets.GH_DEPLOY_NAME }}
- name: Publish with script
run: bun release exec promote --v=${{ github.event.inputs.version }} --t=${{ github.event.inputs.channel }} -u ${{ github.event.inputs.update-branch }}
env:
FORCE_COLOR: 2
CI: true
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}