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
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
publish: | |
name: Publish | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Test & Build | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- run: npm ci | |
- run: npm test | |
- run: npm run build | |
- run: npm run release | |
- run: mkdir -p dist/linux && mv dist/tplight-linux dist/linux/tplight | |
- run: mkdir -p dist/macos && mv dist/tplight-macos dist/macos/tplight | |
- run: mkdir -p dist/windows && mv dist/tplight-win.exe dist/windows/tplight.exe | |
- name: Publish on NPM | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
- name: Release Windows | |
uses: thedoctor0/zip-release@master | |
with: | |
type: 'zip' | |
filename: 'tplight-windows.zip' | |
directory: dist/windows | |
path: tplight.exe | |
- name: Release Mac (intel 64) | |
uses: thedoctor0/zip-release@master | |
with: | |
type: 'zip' | |
filename: 'tplight-macos-i64.zip' | |
directory: dist/macos | |
path: tplight | |
- name: Release Linux (intel 64) | |
uses: thedoctor0/zip-release@master | |
with: | |
type: 'zip' | |
filename: 'tplight-linux-i64.zip' | |
directory: dist/linux | |
path: tplight | |
- name: Publish Releases | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "dist/**/*.zip" | |
token: ${{ secrets.GITHUB_TOKEN }} |