Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add hello world script 6 #12

Merged
merged 4 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 36 additions & 8 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,47 @@
name: Create Release Branch with Changelog

on:
workflow_dispatch:
inputs:
release_branch:
description: 'The release branch to create (e.g., release/v1.2.0)'
required: true
push:
branches:
- main
- 'release/*' # Triggers on any branch starting with 'release/'

permissions:
contents: write
pull-requests: write

name: release-please

jobs:
release-please:
release:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: simple
- name: Checkout repository
uses: actions/checkout@v3

- name: Install release-please
run: npm install -g release-please

- name: Determine Next Version and Create Release Branch
env:
GITHUB_TOKEN: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }}
run: |
# Determine the next version
version=$(release-please version --json | jq -r '.release.version')

# Define the release branch (use the input from workflow dispatch)
branch="${{ github.event.inputs.release_branch }}"

# Create a new release branch with the updated changelog and version bump
git checkout -b "${branch}"
release-please release-pr --release-type node \
--target-branch "${branch}" \
--token "${{ secrets.GITHUB_TOKEN }}"

# Push the release branch
git push origin "${branch}"

- name: Display Next Version
run: echo "Next version is ${version}"
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "1.3.0"
}
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
console.log("Hello, World! 2");
console.log("Hello, World! 3");
File renamed without changes.
Loading