Skip to content

0.2.0

0.2.0 #3

Workflow file for this run

# filepath: .github/workflows/release.yml
name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install dependencies
run: npm install terser -g
- name: Minify JavaScript
run: terser src/xwterm.js -o dist/xwterm.min.js
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.XWTERM_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload minified file
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.XWTERM_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: dist/xwterm.min.js
asset_name: xwterm.min.js
asset_content_type: application/javascript