v3.0.0 #67
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
name: post-release | |
on: | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
inputs: | |
tag: | |
description: 'Release tag to process (optional)' | |
required: false | |
default: '' | |
env: | |
NODE_VERSION: 22.6.0 | |
PNPM_VERSION: 9.7.1 | |
DO_NOT_TRACK: 1 # Disable Turbopack telemetry | |
NEXT_TELEMETRY_DISABLED: 1 # Disable Next telemetry | |
jobs: | |
post_release: | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name != 'workflow_dispatch' }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: ./.github/actions/release-commenter | |
continue-on-error: true | |
env: | |
ACTIONS_STEP_DEBUG: true | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
tag-filter: 'v\d' | |
# Change to blank to disable commenting | |
# comment-template: '' | |
comment-template: | | |
🚀 This is included in version {release_link} | |
update_templates: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: ./.github/actions/setup | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
pnpm-version: ${{ env.PNPM_VERSION }} | |
- name: Update template lockfiles and migrations | |
run: pnpm script:gen-templates | |
- name: Determine Release Tag | |
id: determine_tag | |
run: | | |
if [ "${{ github.event.inputs.tag }}" != "" ]; then | |
echo "Using tag from input: ${{ github.event.inputs.tag }}" | |
echo "release_tag=${{ github.event.inputs.tag }}" >> "$GITHUB_OUTPUT" | |
else | |
echo "Using tag from release event: ${{ github.event.release.tag_name }}" | |
echo "release_tag=${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT" | |
fi | |
- name: Commit and push changes | |
id: commit | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
set -ex | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
export BRANCH_NAME=chore/templates-${{ steps.determine_tag.outputs.release_tag }} | |
git checkout -b $BRANCH_NAME | |
git add -A | |
# If no files have changed, exit early with success | |
git diff --cached --quiet --exit-code && exit 0 | |
git commit -m "chore(templates): bump lockfiles after ${{ steps.determine_tag.outputs.release_tag }}" | |
git push origin $BRANCH_NAME | |
echo "committed=true" >> "$GITHUB_OUTPUT" | |
echo "branch=$BRANCH_NAME" >> "$GITHUB_OUTPUT" | |
- name: Debug Branches | |
run: | | |
echo "Target Commitish: ${{ github.event.release.target_commitish }}" | |
echo "Branch: ${{ steps.commit.outputs.branch }}" | |
echo "Ref: ${{ github.ref }}" | |
- name: Create pull request | |
uses: peter-evans/create-pull-request@v7 | |
if: steps.commit.outputs.committed == 'true' | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
labels: 'area: templates' | |
author: github-actions[bot] <github-actions[bot]@users.noreply.github.com> | |
commit-message: 'Automated update after release' | |
branch: ${{ steps.commit.outputs.branch }} | |
base: ${{ github.event_name != 'workflow_dispatch' && github.event.release.target_commitish || github.ref }} | |
title: 'chore(templates): bump lockfiles after ${{ steps.determine_tag.outputs.release_tag }}' | |
body: 'Automated bump of template lockfiles after release ${{ steps.determine_tag.outputs.release_tag }}' |