NodeJS Upload Asset
ActionsTags
(2)GitHub Action written in TypeScript
Upload asset to release - GitHub Action.
This action uploads an asset to a release, so your workflow can access it.
...
- name: nodejs project information
id: projectinfo
uses: gregoranders/[email protected]
- name: create release
id: createrelease
uses: gregoranders/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: v${{ steps.projectinfo.outputs.version }}
name: ${{ steps.projectinfo.outputs.name }} - ${{ steps.projectinfo.outputs.version }} Release
target: ${{ github.ref }}
- name: upload asset
id: uploadasset
uses: gregoranders/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
id: ${{ steps.createrelease.outputs.id }}
path: package.json
name: '${{ steps.projectinfo.outputs.name }} - ${{ steps.projectinfo.outputs.version }}'
...
inputs:
id:
description: 'Release Id'
required: true
path:
description: 'Release Asset Path'
required: true
label:
description: 'Release Asset Label'
required: false
default: '${name}'
name:
description: 'Release Asset File Name'
required: false
default: '${path}'
outputs:
id:
description: 'Release Id'
url:
description: 'Release Url'
git clone https://github.com/gregoranders/nodejs-upload-asset
npm install
npm run build
Test using Jest
npm test
npm start
npm run clear
Resources
NodeJS Upload Asset is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.