fix publish ci workflow (#90)
This commit is contained in:
parent
d4ebd0655a
commit
b64ea900ec
20
.github/workflows/publish.yml
vendored
20
.github/workflows/publish.yml
vendored
@ -11,12 +11,12 @@ jobs:
|
|||||||
- uses: actions/setup-node@v3
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
registry-url: 'https://registry.npmjs.org'
|
registry-url: "https://registry.npmjs.org"
|
||||||
- name: Install dependencies and build 🔧
|
- name: Install dependencies and build 🔧
|
||||||
run: npm ci && npm run build
|
run: npm ci && npm run build
|
||||||
- name: Run lint
|
- name: Run lint
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: npm run test
|
run: npm run test
|
||||||
- name: Package module
|
- name: Package module
|
||||||
run: npm pack
|
run: npm pack
|
||||||
@ -25,7 +25,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
[ ${GITHUB_REF:11} = $(node -p "require('./package.json').version") ]
|
[ ${GITHUB_REF:11} = $(node -p "require('./package.json').version") ]
|
||||||
echo "version=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
|
echo "version=${GITHUB_REF:11}" >> $GITHUB_OUTPUT
|
||||||
- name: Upload npm package file
|
- name: Upload package file
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: esptool-js-${{ steps.version.outputs.version }}.tgz
|
name: esptool-js-${{ steps.version.outputs.version }}.tgz
|
||||||
@ -49,7 +49,17 @@ jobs:
|
|||||||
### Bug Fixes
|
### Bug Fixes
|
||||||
|
|
||||||
<!-- Insert The Bug Fixes below as points, also add relevant links -->
|
<!-- Insert The Bug Fixes below as points, also add relevant links -->
|
||||||
|
- name: Upload release
|
||||||
|
id: upload-release-asset
|
||||||
|
uses: actions/upload-release-asset@v1.0.1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./esptool-js-${{ steps.version.outputs.version }}.tgz
|
||||||
|
asset_name: esptool-js-${{ steps.version.outputs.version }}.tgz
|
||||||
|
asset_content_type: application/zip
|
||||||
- name: Publish package on NPM 📦
|
- name: Publish package on NPM 📦
|
||||||
run: npm publish
|
run: npm publish
|
||||||
env:
|
env:
|
||||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||||
|
Loading…
Reference in New Issue
Block a user