minor fix #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Publish | |
on: | |
push: | |
branches: | |
- main | |
- ci/* | |
release: | |
types: | |
- created | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v3 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2.4.0 | |
with: | |
version: 8 | |
run_install: false | |
shell: bash | |
if: runner.os == 'Linux' | |
run: | | |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
echo store_path=${{ env.STORE_PATH }} | |
pnpm install && npx vsce publish -p ${{ secrets.VSCE_PAT }} | |
# - uses: actions/cache@v3 | |
# name: Setup pnpm cache | |
# with: | |
# path: ${{ env.STORE_PATH }} | |
# key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
# restore-keys: | | |
# ${{ runner.os }}-pnpm-store- | |
# - run: pnpm install && pnpm run package | |
# if: runner.os == 'Linux' | |
release-please: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- uses: google-github-actions/release-please-action@v3 | |
with: | |
release-type: node | |
package-name: mcap-cli-vscode-${{ steps.release.outputs.tag_name }} | |
bump-patch-for-minor-pre-major: true | |
- name: Publish and Upload Release Artifact | |
if: ${{ steps.release.outputs.release_created }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
VSCE_PAT: ${{ secrets.VSCE_PAT }} | |
run: | | |
pnpm i | |
ls -al | |
npx vsce package | |
npx vsce publish -p ${{ secrets.VSCE_PAT }} | |
echo tag_name: ${{ steps.release.outputs.tag_name }} | |
gh release upload ${{ steps.release.outputs.tag_name }} ./mcap-cli-vscode-${{ steps.release.outputs.tag_name }}.vsix | |