|
13 | 13 | - alpha |
14 | 14 | - beta |
15 | 15 | - latest |
| 16 | + issue_comment: |
| 17 | + types: [created] |
16 | 18 |
|
17 | 19 | jobs: |
| 20 | + issue_commentd: |
| 21 | + name: Release with commentd |
| 22 | + if: github.event.issue.pull_request && contains(github.event.comment.body, '!canary') |
| 23 | + runs-on: [self-hosted, rspack-common, macOS, ARM64, release] |
| 24 | + steps: |
| 25 | + - name: Checkout Repo |
| 26 | + uses: actions/checkout@v3 |
| 27 | + with: |
| 28 | + # This makes Actions fetch only one branch to release |
| 29 | + fetch-depth: 1 |
| 30 | + ref: refs/pull/${{ github.event.issue.number }}/head |
| 31 | + - name: Install rus toolchain |
| 32 | + uses: actions-rs/toolchain@v1 |
| 33 | + with: |
| 34 | + toolchain: nightly-2022-08-06 |
| 35 | + profile: default |
| 36 | + components: rustfmt, clippy, cargo |
| 37 | + - uses: actions/setup-node@v3 |
| 38 | + with: |
| 39 | + node-version: "16" |
| 40 | + architecture: "arm64" |
| 41 | + - name: Install node_modules |
| 42 | + run: | |
| 43 | + |
| 44 | + pnpm -v |
| 45 | + pnpm install |
| 46 | + - name: Build |
| 47 | + run: ./x build cli:release:all |
| 48 | + - name: Release |
| 49 | + uses: modern-js-dev/actions@v2 |
| 50 | + with: |
| 51 | + # this expects you to have a script called release which does a build for your packages and calls changeset publish |
| 52 | + version: "canary" |
| 53 | + type: "release" |
| 54 | + branch: "" |
| 55 | + tools: "changeset" |
| 56 | + env: |
| 57 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 58 | + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 59 | + REPOSITORY: ${{ github.repository }} |
| 60 | + PULL_REQUEST_NUMBER: ${{ github.event.issue.number }} |
18 | 61 | release: |
19 | 62 | name: Release |
20 | 63 | runs-on: [self-hosted, rspack-common, macOS, ARM64, release] |
21 | | - |
| 64 | + if: ${{ github.event_name == 'workflow_dispatch' }} |
22 | 65 | steps: |
23 | 66 | - name: Checkout Repo |
24 | 67 | uses: actions/checkout@master |
|
55 | 98 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
56 | 99 | REPOSITORY: ${{ github.repository }} |
57 | 100 | REF: ${{ github.ref }} |
58 | | - - name: Write a new comment |
59 | | - uses: peter-evans/[email protected] |
60 | | - continue-on-error: true |
61 | | - with: |
62 | | - issue-number: ${{ github.event.issue.number }} |
63 | | - body: | |
64 | | - ${{ steps.release.outputs.comment }} |
|
0 commit comments