Skip to content

fix bundle filename

fix bundle filename #3

Workflow file for this run

name: Build and Release
on:
push:
tags:
- 'v*.*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout repository
- name: Checkout code
uses: actions/checkout@v3
# Set up Node.js environment
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: build
path: ./dist
release:
needs: build
runs-on: ubuntu-latest
steps:
# Checkout repository again in release job
- name: Checkout code
uses: actions/checkout@v3
- name: Download build artifacts
uses: actions/download-artifact@v3
with:
name: build
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref }}
name: Release ${{ github.ref }}
body: 'Autocreated release from GitHub Actions.'
draft: false
prerelease: false
- name: Upload build to release
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./dist/main.min.js
asset_name: main.min.js
asset_content_type: application/javascript