Skip to content

Commit 038fa3a

Browse files
committed
fix: update pull-request based on the npm docs
1 parent 3e26c8e commit 038fa3a

2 files changed

Lines changed: 2 additions & 55 deletions

File tree

.github/workflows/beta-release.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: Beta Release
22

33
on:
4-
workflow_call:
4+
pull_request:
5+
types: [opened, synchronize, reopened, ready_for_review]
56

67
jobs:
78
beta_release:

.github/workflows/pull-request.yaml

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -16,60 +16,6 @@ jobs:
1616
if: 'github.event.pull_request.draft == false'
1717
uses: ./.github/workflows/bundlesize.yaml
1818

19-
beta_release:
20-
permissions:
21-
contents: read
22-
id-token: write
23-
if: github.event.pull_request.draft == false
24-
runs-on: ubuntu-latest
25-
steps:
26-
- uses: actions/checkout@v4
27-
with:
28-
ref: ${{ github.head_ref }}
29-
- uses: actions/setup-node@v4
30-
with:
31-
node-version: '20.x'
32-
registry-url: 'https://registry.npmjs.org'
33-
cache: 'yarn'
34-
35-
- name: Install dev dependencies
36-
run: yarn install
37-
38-
- name: Setup git credentials
39-
run: |
40-
git config --global user.name 'Auto Release Bot'
41-
git config --global user.email 'auto-release-bot@users.noreply.github.com'
42-
43-
- name: Get current package.json version
44-
run: echo "PACKAGE_VERSION=$(npm pkg get version)" >> $GITHUB_ENV
45-
46-
- name: Setup Beta Release Version
47-
run: node beta-release.js --issue $GITHUB_PR_NUMBER
48-
env:
49-
GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
50-
51-
- name: Release a new beta version
52-
run: npm publish --tag beta --provenance --access public
53-
54-
- uses: actions/github-script@v6
55-
with:
56-
script: |
57-
github.rest.issues.createComment({
58-
issue_number: context.issue.number,
59-
owner: context.repo.owner,
60-
repo: context.repo.repo,
61-
body: `Beta version released with the last commit 🚀
62-
63-
\`\`\`
64-
yarn add react-tooltip@${{ env.NEW_VERSION }}
65-
\`\`\`
66-
or
67-
\`\`\`
68-
npm install react-tooltip@${{ env.NEW_VERSION }}
69-
\`\`\`
70-
`
71-
})
72-
7319
fail_if_pull_request_is_draft:
7420
if: github.event.pull_request.draft == true
7521
runs-on: ubuntu-18.04

0 commit comments

Comments
 (0)