diff options
author | Nate Sesti <sestinj@gmail.com> | 2023-08-09 22:58:07 -0700 |
---|---|---|
committer | Nate Sesti <sestinj@gmail.com> | 2023-08-09 22:58:07 -0700 |
commit | a131c17326591e67a68faf6f96371ad8fc332b71 (patch) | |
tree | cf8573a90bd3ad2f2d74ad7c2638c4243aabccc6 /.github | |
parent | cbd7656bb4c9aebfe98c746111af52cf7192aa1b (diff) | |
download | sncontinue-a131c17326591e67a68faf6f96371ad8fc332b71.tar.gz sncontinue-a131c17326591e67a68faf6f96371ad8fc332b71.tar.bz2 sncontinue-a131c17326591e67a68faf6f96371ad8fc332b71.zip |
fix: :green_heart: publishing to depend on ALL tests
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/main.yaml | 66 |
1 files changed, 45 insertions, 21 deletions
diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 9bc05281..99b30201 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -45,7 +45,7 @@ jobs: name: ${{ runner.os }} Build path: dist/* - test-and-publish-extension: + test-and-package: needs: pyinstaller strategy: matrix: @@ -135,42 +135,66 @@ jobs: npm run test if: matrix.os != 'ubuntu-20.04' - # Publish the extension and commit/push the version change (ONLY on ubuntu-20.04) + # Upload .vsix artifact + + - name: Upload .vsix as an artifact + uses: actions/upload-artifact@v2 + with: + name: vsix-artifact + path: extension/build/* + if: matrix.os == 'ubuntu-20.04' + + publish: + needs: test-and-package + runs-on: ubuntu-20.04 + permissions: + contents: write + + steps: + # Checkout and download .vsix artifact + + - name: Checkout + uses: actions/checkout@v2 + + - name: Download .vsix artifact + uses: actions/download-artifact@v2 + with: + name: vsix-artifact + path: extension/build + + # Publish the extension and commit/push the version change + + - name: Use Node.js 19.0.0 + uses: actions/setup-node@v3 + with: + node-version: 19.0.0 + + - name: Cache extension node_modules + uses: actions/cache@v2 + with: + path: extension/node_modules + key: ${{ runner.os }}-node-${{ hashFiles('extension/package-lock.json') }} + + - name: Install extension Dependencies + run: | + cd extension + npm ci - name: Publish run: | cd extension npx vsce publish patch -p ${{ secrets.VSCE_TOKEN }} - if: matrix.os == 'ubuntu-20.04' - - name: Commit changes run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git commit -am "ci: 💚 Update package.json version [skip ci]" - if: matrix.os == 'ubuntu-20.04' - - name: Push changes uses: ad-m/github-push-action@master with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: ${{ github.ref }} - if: matrix.os == 'ubuntu-20.04' - - name: Upload .vsix as an artifact - uses: actions/upload-artifact@v2 - with: - name: vsix-artifact - path: extension/build/* - if: matrix.os == 'ubuntu-20.04' - - publish-binaries: - needs: test-and-publish-extension - runs-on: ubuntu-20.04 - permissions: - contents: write - - steps: # Download binaries and upload to S3 - name: Download Linux build |