mirror of
https://github.com/gradle/actions.git
synced 2025-08-20 16:41:28 +08:00
30 lines
822 B
YAML
30 lines
822 B
YAML
name: 'Build and upload distribution'
|
|
# Builds the action distribution an uploads as an artifact for later download
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: sources/package-lock.json
|
|
- name: Build distribution
|
|
shell: bash
|
|
run: |
|
|
npm -v
|
|
node -v
|
|
npm install
|
|
npm run build
|
|
working-directory: sources
|
|
|
|
- name: Copy the generated sources/dist directory to the top-level dist
|
|
shell: bash
|
|
run: |
|
|
cp -r sources/dist .
|
|
|
|
- name: Upload distribution
|
|
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
|
|
with:
|
|
name: dist
|
|
path: dist/
|