|
16 | 16 | if: 'github.event.pull_request.draft == false' |
17 | 17 | uses: ./.github/workflows/bundlesize.yaml |
18 | 18 |
|
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 | | -
|
73 | 19 | fail_if_pull_request_is_draft: |
74 | 20 | if: github.event.pull_request.draft == true |
75 | 21 | runs-on: ubuntu-18.04 |
|
0 commit comments