From 926b050a636e5b751e1a9e3ee7804941550bca20 Mon Sep 17 00:00:00 2001 From: Maksim Syomochkin Date: Tue, 7 Dec 2021 11:35:44 +0300 Subject: [PATCH] add package step to gh actions --- .github/workflows/main.yml | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 92b11aa..f5d11ec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,4 +28,34 @@ jobs: ${{ runner.os }}- - run: npm run lint env: - DISPLAY: ":99.0" \ No newline at end of file + 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 }} \ No newline at end of file