Skip to content

Commit e75bc1b

Browse files
avivkellerCopilot
andauthored
feat(cicd): automate the creation of blog posts (#8231)
* feat(cicd): automate the creation of blog posts * run url Signed-off-by: Aviv Keller <me@aviv.sh> * fixup! * Update .github/workflows/create-release-post.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Aviv Keller <me@aviv.sh> * copilot suggestions * fixup! * fixup! --------- Signed-off-by: Aviv Keller <me@aviv.sh> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 0a6bec2 commit e75bc1b

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Security Notes
2+
# Only selected Actions are allowed within this repository. Please refer to (https://github.com/nodejs/nodejs.org/settings/actions)
3+
# for the full list of available actions. If you want to add a new one, please reach out a maintainer with Admin permissions.
4+
# REVIEWERS, please always double-check security practices before merging a PR that contains Workflow changes!!
5+
# AUTHORS, please only use actions with explicit SHA references, and avoid using `@master` or `@main` references or `@version` tags.
6+
7+
name: Create Release Blog Post
8+
9+
on:
10+
workflow_dispatch:
11+
inputs:
12+
version:
13+
description: The version to generate a blog post for.
14+
type: string
15+
required: true
16+
17+
defaults:
18+
run:
19+
# This ensures that the working directory is the root of the repository
20+
working-directory: ./
21+
22+
permissions:
23+
contents: write
24+
25+
jobs:
26+
create-post:
27+
runs-on: ubuntu-latest
28+
29+
steps:
30+
- uses: nodejs/web-team/actions/setup-environment@2c2897a93eb99b4cdca270729100bc0887c758d9
31+
with:
32+
pnpm: true
33+
use-version-file: true
34+
35+
- run: node --run scripts:release-post "$VERSION"
36+
env:
37+
VERSION: ${{ inputs.version }}
38+
39+
- name: Open pull request
40+
uses: gr2m/create-or-update-pull-request-action@b65137ca591da0b9f43bad7b24df13050ea45d1b # v1.10.1
41+
# Creates a PR or update the Action's existing PR, or
42+
# no-op if the base branch is already up-to-date.
43+
with:
44+
update-pull-request-title-and-body: true
45+
branch: release-${{ inputs.version }}
46+
body: |
47+
Creates a new blog post for ${{ inputs.version }}
48+
49+
Check this workflow's logs at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}.
50+
commit-message: 'feat(blog): create post for ${{ inputs.version }}'
51+
labels: fast-track
52+
title: 'feat(blog): create post for ${{ inputs.version }}'
53+
draft: true

0 commit comments

Comments
 (0)