From 96eac2fa09e8c89f44c12a3cb6b92f1cb8f3b89a Mon Sep 17 00:00:00 2001 From: eden <198768181+lcweden@users.noreply.github.com> Date: Sun, 31 May 2026 06:03:13 +0000 Subject: [PATCH 1/2] chore: add GitHub Actions workflow for labeling pull requests --- .github/workflows/label.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/label.yml diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml new file mode 100644 index 0000000..8fb372d --- /dev/null +++ b/.github/workflows/label.yml @@ -0,0 +1,14 @@ +name: Label +on: [pull_request_target] + +jobs: + label: + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + + steps: + - uses: actions/labeler@v4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" From c2e6b522d19011e226ff2ca5fbd5e428e4f69bd9 Mon Sep 17 00:00:00 2001 From: eden <198768181+lcweden@users.noreply.github.com> Date: Sun, 31 May 2026 06:03:22 +0000 Subject: [PATCH 2/2] chore: add bump workflow for version management --- .github/workflows/bump.yml | 62 +++++++++++++++++++++++++++++++++++ .github/workflows/publish.yml | 2 +- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/bump.yml diff --git a/.github/workflows/bump.yml b/.github/workflows/bump.yml new file mode 100644 index 0000000..c5db448 --- /dev/null +++ b/.github/workflows/bump.yml @@ -0,0 +1,62 @@ +name: Bump + +on: + workflow_dispatch: + inputs: + version: + description: "new version(e.g., 1.2.3)" + required: true + type: string + +permissions: + contents: write + pull-requests: write + +jobs: + release-pr: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v6 + + - name: Set up Node.js + uses: actions/setup-node@v6 + with: + node-version: lts/* + cache: npm + registry-url: https://registry.npmjs.org/ + + - name: Store Version + run: | + TARGET_VERSION="${{ github.event.inputs.version }}" + TARGET_VERSION="${TARGET_VERSION#v}" + echo "VERSION=$TARGET_VERSION" >> $GITHUB_ENV + + - name: Update Package Version + run: | + jq ".version = \"$VERSION\"" package.json > tmp.json && mv tmp.json package.json + jq ".version = \"$VERSION\"" deno.json > tmp.json && mv tmp.json deno.json + npm install --package-lock-only --ignore-scripts + + - name: Setup Git + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + - name: Git Commit + run: | + BRANCH_NAME="release/v$VERSION" + git checkout -b "$BRANCH_NAME" + git add --all + git commit -m "chore: bump version to v$VERSION" + git push -u origin "$BRANCH_NAME" + + - name: Pull Request + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh pr create \ + --title "release/v$VERSION" \ + --body "This pull request bumps the version to v$VERSION." \ + --head "release/v$VERSION" \ + --base main diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 766a55f..974eb18 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,7 +17,7 @@ jobs: - name: Checkout uses: actions/checkout@v6 - - name: Set up Node + - name: Set up Node.js uses: actions/setup-node@v6 with: node-version: lts/*