mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Publish npm package via gh actions (#2695)
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
parent
1af12fe59e
commit
bf96e6ef4c
@ -173,8 +173,3 @@ jobs:
|
||||
AWS_ACCESS_KEY_ID: $(AWS_ACCESS_KEY_ID)
|
||||
AWS_SECRET_ACCESS_KEY: $(AWS_SECRET_ACCESS_KEY)
|
||||
BUILD_NUMBER: $(Build.BuildNumber)
|
||||
- script: make publish-npm
|
||||
displayName: Publish npm package
|
||||
condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))"
|
||||
env:
|
||||
NPM_TOKEN: $(NPM_TOKEN)
|
||||
|
||||
33
.github/workflows/publish-npm.yml
vendored
Normal file
33
.github/workflows/publish-npm.yml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
name: Publish NPM
|
||||
on:
|
||||
release:
|
||||
types:
|
||||
- published
|
||||
jobs:
|
||||
publish:
|
||||
name: Publish NPM
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [12.x]
|
||||
steps:
|
||||
- name: Checkout Release
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Using Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Generate NPM package
|
||||
run: |
|
||||
make build-npm
|
||||
|
||||
- name: publish new release
|
||||
if: contains(github.ref, 'refs/tags/v')
|
||||
run: |
|
||||
make publish-npm
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
2
Makefile
2
Makefile
@ -106,7 +106,7 @@ build-npm: build-extension-types copy-extension-themes src/extensions/npm/extens
|
||||
yarn npm:fix-package-version
|
||||
|
||||
.PHONY: build-extension-types
|
||||
build-extension-types: src/extensions/npm/extensions/dist
|
||||
build-extension-types: node_modules src/extensions/npm/extensions/dist
|
||||
|
||||
.PHONY: publish-npm
|
||||
publish-npm: node_modules build-npm
|
||||
|
||||
Loading…
Reference in New Issue
Block a user