From 3f7075316c264c167e4dccc07e61ff052e00febb Mon Sep 17 00:00:00 2001 From: Shahid Hussain Date: Fri, 8 Nov 2024 00:07:56 +0000 Subject: [PATCH 1/3] feat: add hello world script 4 --- .github/workflows/release-dry-run.yml | 41 +++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/release-dry-run.yml diff --git a/.github/workflows/release-dry-run.yml b/.github/workflows/release-dry-run.yml new file mode 100644 index 0000000..b2487b7 --- /dev/null +++ b/.github/workflows/release-dry-run.yml @@ -0,0 +1,41 @@ +name: Release Version Preview + +on: + pull_request: + types: [opened, edited, synchronize] + branches: + - main + +jobs: + release_preview: + if: github.event.pull_request.title contains 'RELEASE' + runs-on: ubuntu-latest + + steps: + - name: Check out code + uses: actions/checkout@v3 + + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + + - name: Install release-please + run: npm install -g release-please + + - name: Run release-please dry-run + id: release_please + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + release-please release-pr --repo-url ${{ github.repository }} --token ${{ secrets.GITHUB_TOKEN }} --dry-run > release_output.txt + version=$(grep -oP 'release \K\d+\.\d+\.\d+' release_output.txt || echo "Version not found") + echo "version=$version" >> $GITHUB_ENV + + - name: Add dry-run version output to PR comment + uses: marocchino/sticky-pull-request-comment@v2 + with: + header: release-please dry-run version + message: | + ## Release-please Dry Run + **Proposed Release Version:** ${{ env.version }} \ No newline at end of file From 6a57c46623af3604cb922fc8e3257939aff15433 Mon Sep 17 00:00:00 2001 From: Shahid Hussain Date: Fri, 8 Nov 2024 00:09:29 +0000 Subject: [PATCH 2/3] feat: add hello world script 5 --- .github/workflows/release-dry-run.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release-dry-run.yml b/.github/workflows/release-dry-run.yml index b2487b7..0dd0489 100644 --- a/.github/workflows/release-dry-run.yml +++ b/.github/workflows/release-dry-run.yml @@ -8,7 +8,6 @@ on: jobs: release_preview: - if: github.event.pull_request.title contains 'RELEASE' runs-on: ubuntu-latest steps: From e7562c8557d03940ed0325ac652a0f0cdf8d2f13 Mon Sep 17 00:00:00 2001 From: Shahid Hussain Date: Fri, 8 Nov 2024 00:12:11 +0000 Subject: [PATCH 3/3] feat: add hello world script 5 --- release-please-config.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 release-please-config.json diff --git a/release-please-config.json b/release-please-config.json new file mode 100644 index 0000000..206325f --- /dev/null +++ b/release-please-config.json @@ -0,0 +1,8 @@ +{ + "release-type": "node", + "packages": { + ".": { + "release-type": "node" + } + } +} \ No newline at end of file