esptool-js-openDTU/.github/workflows/publish.yml
Brian Ignacio 2ed745673c update esploader file name
fix lint rm webserial js
2022-11-25 18:49:08 +08:00

53 lines
1.6 KiB
YAML

on:
push:
tags:
- "v*"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies and build 🔧
run: npm ci && npm run build
- name: Run lint
run: npm run lint
- name: Run tests
run: npm run test
- name: Package module
run: npm pack
- name: Determine version
id: version
run: "echo ::set-output name=version::${GITHUB_REF:11}"
- name: Upload npm package file
uses: actions/upload-artifact@v1
with:
name: esptool-js-${{ steps.version.outputs.version }}.tgz
path: esptool-js-${{ steps.version.outputs.version }}.tgz
- name: Create Release
id: create_release
uses: actions/create-release@v1.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Espressif ESPTOOL-JS ${{ github.ref }}
draft: true
body: |
### Release Highlights
### Features & Enhancements
<!-- Insert The Features and Enhancements below as points possibly add the link to the PR/commit -->
### Bug Fixes
<!-- Insert The Bug Fixes below as points, also add relevant links -->
- name: Publish package on NPM 📦
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}