[Dependencies] (deps): Bump the all group across 1 directory with 19 … #337
Workflow file for this run
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
# Releases a new version on a push to main + redeploys on Vercel with that version | |
# On other branches, will dry-run the release version to see what we'll release when deployed | |
name: Release | |
on: | |
- push | |
env: | |
VERCEL_DEPLOY_TOKEN: ${{ secrets.VERCEL_DEPLOY_TOKEN }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
get-version: | |
timeout-minutes: 5 | |
name: 'Dry run of release version' | |
if: github.ref != 'refs/heads/main' # only on non-main | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .node-version | |
cache: 'pnpm' | |
- run: pnpm install | |
- name: Dry run release onto main | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: pnpm turbo release -- --dry-run --branches="main, ${{ github.ref_name }}" | |
release: | |
timeout-minutes: 5 | |
name: 'Release new version' | |
if: github.ref == 'refs/heads/main' # do not run elsewhere! | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .node-version | |
cache: 'pnpm' | |
- run: pnpm install | |
- name: Release new repo version | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: pnpm turbo release -- --branches="main" | |
redeploy: | |
timeout-minutes: 5 | |
name: 'Redeploy with new version' | |
if: github.ref == 'refs/heads/main' # do not run elsewhere! | |
runs-on: ubuntu-latest | |
needs: [release] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version-file: .node-version | |
cache: 'pnpm' | |
- run: pnpm install | |
- uses: actions-ecosystem/action-get-latest-tag@v1 | |
name: Get latest version tag | |
with: | |
semver_only: true | |
id: latest-version-tag | |
- name: Pull Vercel Environment Information | |
if: ${{ steps.latest-version-tag.outputs.tag != '' }} | |
run: pnpm vercel pull --yes --environment=production --token=${{ env.VERCEL_DEPLOY_TOKEN }} | |
- name: Build Project Artifacts with latest version | |
if: ${{ steps.latest-version-tag.outputs.tag != '' }} | |
run: | | |
echo "Latest tag: ${LATEST_TAG}" | |
NEXT_PUBLIC_APP_VERSION="${LATEST_TAG}" pnpm vercel build --prod --token=${{ env.VERCEL_DEPLOY_TOKEN }} | |
env: | |
LATEST_TAG: ${{ steps.latest-version-tag.outputs.tag }} | |
- name: Deploy Project Artifacts to Vercel | |
if: ${{ steps.latest-version-tag.outputs.tag != '' }} | |
run: pnpm vercel deploy --prebuilt --prod --token=${{ env.VERCEL_DEPLOY_TOKEN }} |