Skip to content

chore(deps): update actions/upload-artifact action to v4.6.1 #2823

chore(deps): update actions/upload-artifact action to v4.6.1

chore(deps): update actions/upload-artifact action to v4.6.1 #2823

Workflow file for this run

name: CI
on:
workflow_dispatch:
schedule:
- cron: '0 */3 * * *' # Build and deploy every 3 hours.
pull_request:
types:
- opened
- synchronize
paths-ignore:
- README.md
push:
branches:
- main
- 'renovate/**'
paths-ignore:
- README.md
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
check-typos:
name: Check typos
if: github.event_name != 'schedule'
runs-on: ubuntu-latest
steps:
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
- uses: crate-ci/typos@master
with:
files: .
wasm:
name: Build Wasm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: oxc-project/oxc
ref: main
- uses: oxc-project/setup-rust@cd82e1efec7fef815e2c23d296756f31c7cdc03d # v1.0.0
with:
save-cache: ${{ github.ref_name == 'main' }}
tools: wasm-pack,just
- run: just build-wasm
- uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
with:
if-no-files-found: error
name: wasm
path: npm/oxc-wasm
build:
needs: wasm
name: Build Playground
runs-on: ubuntu-latest
env:
SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
steps:
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version-file: .node-version
cache: pnpm
- run: pnpm install --frozen-lockfile
# Download after to invalidate the version from pnpm cache
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
merge-multiple: true
name: wasm
path: ../oxc/npm/oxc-wasm
- run: pnpm run build
- name: Install Netlify
if: env.SITE_ID
run: pnpm install -g [email protected]
# https://www.raulmelo.me/en/blog/deploying-netlify-github-actions-guide
- name: Deploy to Netlify
id: netlify_deploy
if: env.SITE_ID
run: |
prod_flag=""
if [ "${{ github.ref_name }}" = "main" ]; then prod_flag="--prod"; fi
echo $prod_flag
netlify deploy \
--dir dist \
--site ${{ secrets.NETLIFY_SITE_ID }} \
--auth ${{ secrets.NETLIFY_API_TOKEN }} \
$prod_flag \
--json \
> deploy_output.json
cat deploy_output.json
- name: Generate URL Preview
id: url_preview
if: env.SITE_ID && github.event_name == 'pull_request'
run: |
NETLIFY_PREVIEW_URL=$(jq -r '.deploy_url' deploy_output.json)
echo "NETLIFY_PREVIEW_URL=$NETLIFY_PREVIEW_URL" >> $GITHUB_OUTPUT
- uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
if: env.SITE_ID && github.event_name == 'pull_request'
with:
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.number }}
body: 'Preview URL: ${{ steps.url_preview.outputs.NETLIFY_PREVIEW_URL }}'