Skip to content

docs(en): merge rollup/master into rollup-docs-cn/master @ 74710745 #278

docs(en): merge rollup/master into rollup-docs-cn/master @ 74710745

docs(en): merge rollup/master into rollup-docs-cn/master @ 74710745 #278

Workflow file for this run

name: Upload REPL artefacts
on:
pull_request_target:
types:
- synchronize
- opened
- reopened
- labeled
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
upload:
permissions:
pull-requests: write # for peter-evans/find-comment and peter-evans/create-or-update-comment
if: ${{ github.event.pull_request.head.repo.full_name == 'rollup/rollup' || contains( toJson(github.event.pull_request.labels), 'x⁸ ⚙️ build repl artefacts' ) }}
runs-on: ubuntu-latest
name: Upload
steps:
- name: Checkout Commit
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
ref: refs/pull/${{ github.event.number }}/merge
- name: Install Toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2025-07-25
components: rust-src
- name: Restore Cargo cache
uses: actions/cache/restore@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
.cargo-cache
rust/target/
key: wasm-cargo-ubuntu-latest-${{ hashFiles('rust/Cargo.lock') }}
restore-keys: wasm-cargo-ubuntu-latest
- name: Setup Node
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
with:
node-version: 24.7.0
- name: Install and Cache Node Dependencies
uses: ./.github/actions/install-and-cache-node-deps
- name: Build artefacts
run: >-
npm exec -- concurrently -c green,blue,yellow 'npm:build:napi -- --release' 'npm run build:wasm' 'npm:build:cjs' &&
npm run build:copy-native && npm run build:bootstrap
- name: Upload "${{ github.event.number }}/rollup.browser.js" to bucket
uses: zdurham/s3-upload-github-action@master
with:
args: --cache-control max-age=300,public
env:
FILE: browser/dist/rollup.browser.js
AWS_REGION: ${{ secrets.AWS_REGION }}
S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
S3_KEY: ${{ github.event.number }}/rollup.browser.js
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Upload "${{ github.event.number }}/rollup.browser.js.map" to bucket
uses: zdurham/s3-upload-github-action@master
with:
args: --cache-control max-age=300,public
env:
FILE: browser/dist/rollup.browser.js.map
AWS_REGION: ${{ secrets.AWS_REGION }}
S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
S3_KEY: ${{ github.event.number }}/rollup.browser.js.map
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Upload "${{ github.event.number }}/bindings_wasm_bg.wasm" to bucket
uses: zdurham/s3-upload-github-action@master
with:
args: --cache-control max-age=300,public
env:
FILE: browser/dist/bindings_wasm_bg.wasm
AWS_REGION: ${{ secrets.AWS_REGION }}
S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
S3_KEY: ${{ github.event.number }}/bindings_wasm_bg.wasm
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Find Comment
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e # v3.1.0
id: findComment
with:
issue-number: ${{ github.event.number }}
comment-author: 'github-actions[bot]'
body-includes: 'Thank you for your contribution!'
- name: Create or update comment
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
id: createInitialComment
with:
comment-id: ${{ steps.findComment.outputs.comment-id }}
issue-number: ${{ github.event.number }}
edit-mode: replace
body: |
### Thank you for your contribution! ❤️
You can try out this pull request locally by installing Rollup via
```bash
npm install ${{ github.event.pull_request.head.repo.full_name }}#${{ github.event.pull_request.head.ref }}
```
Notice: Ensure you have installed the latest nightly Rust toolchain. If you haven't installed it yet, please see https://www.rust-lang.org/tools/install to learn how to download Rustup and install Rust.
or load it into the REPL:
https://rollupjs.org/repl/?pr=${{ github.event.number }}
- name: Find Vercel preview URL
uses: patrickedqvist/wait-for-vercel-preview@06c79330064b0e6ef7a2574603b62d3c98789125 # v1.3.2
id: waitForVercel
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Update comment with Vercel preview URL
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
if: ${{ steps.waitForVercel.outputs.url }}
with:
comment-id: ${{ steps.createInitialComment.outputs.comment-id }}
issue-number: ${{ github.event.number }}
edit-mode: replace
body: |
### Thank you for your contribution! ❤️
You can try out this pull request locally by installing Rollup via
```bash
npm install ${{ github.event.pull_request.head.repo.full_name }}#${{ github.event.pull_request.head.ref }}
```
Notice: Ensure you have installed the latest nightly Rust toolchain. If you haven't installed it yet, please see https://www.rust-lang.org/tools/install to learn how to download Rustup and install Rust.
or load it into the REPL:
${{ steps.waitForVercel.outputs.url }}/repl/?pr=${{ github.event.number }}