v0.0.16 #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build frontend | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
production: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '16' | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 7 | |
- name: Install dependencies | |
working-directory: web | |
run: pnpm install | |
- name: Build | |
working-directory: web | |
run: pnpm run build | |
- name: Archive | |
run: zip -r fe-production.zip web/dist | |
- name: Upload to release | |
uses: svenstaro/[email protected] | |
with: | |
file: fe-production.zip | |
overwrite: true | |
tag: ${{ github.event.release.tag_name }} | |
umd: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v1 | |
with: | |
registry-url: "https://registry.npmjs.org" | |
node-version: '16' | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 7 | |
- name: Install dependencies | |
working-directory: web | |
run: pnpm install | |
- name: Build | |
working-directory: web | |
run: pnpm run umd | |
- name: Archive | |
run: zip -r fe-umd.zip web/dist | |
- name: Upload to release | |
uses: svenstaro/[email protected] | |
with: | |
file: fe-umd.zip | |
overwrite: true | |
tag: ${{ github.event.release.tag_name }} | |
- name: Create folder for npm package | |
run: | | |
mkdir -p package-umd | |
cp web/dist/* package-umd | |
cp package.json package-umd | |
- name: Publish to npm | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: | | |
cd package-umd | |
pwd | |
ls | |
npm install | |
npm ci | |
npm publish --access public | |