add package step to gh actions
This commit is contained in:
32
.github/workflows/main.yml
vendored
32
.github/workflows/main.yml
vendored
@@ -28,4 +28,34 @@ jobs:
|
||||
${{ runner.os }}-
|
||||
- run: npm run lint
|
||||
env:
|
||||
DISPLAY: ":99.0"
|
||||
DISPLAY: ":99.0"
|
||||
package:
|
||||
runs-on: ubuntu-latest
|
||||
needs: lint
|
||||
name: Package
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: "14"
|
||||
- run: npm install
|
||||
- name: Cache node modules
|
||||
uses: actions/cache@v2
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||
${{ runner.os }}-build-
|
||||
${{ runner.os }}-
|
||||
- run: npm install -g vsce
|
||||
- run: vsce package
|
||||
- run: echo "VSIX_PATH=$(find . -maxdepth 1 -type f -iname "*.vsix" | head -1)" >> $GITHUB_ENV
|
||||
- run: echo "VSIX_NAME=$(basename $(find . -maxdepth 1 -type f -iname "*.vsix" | head -1))" >> $GITHUB_ENV
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
path: ${{ env.VSIX_PATH }}
|
||||
name: ${{ env.VSIX_NAME }}
|
||||
Reference in New Issue
Block a user