From 2046b76db5c9a5dd9f089249e4c58c0df7842a3c Mon Sep 17 00:00:00 2001 From: Catherine Date: Mon, 7 Oct 2024 22:35:49 +0000 Subject: [PATCH] Set up continuous integration. --- .github/FUNDING.yml | 1 + .github/workflows/ci.yml | 47 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 .github/FUNDING.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..5e2b3f8 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +patreon: whitequark diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..6d11f08 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,47 @@ +on: + push: + branches: + - main + tags: + - v* + pull_request: + merge_group: +name: CI +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Check out source code + uses: actions/checkout@v4 + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: v20.x + - name: Install dependencies + run: npm install + - name: Package extension + run: npm run package + - name: Upload package artifact + uses: actions/upload-artifact@v4 + with: + name: package + path: '*.vsix' + publish: + needs: build + runs-on: ubuntu-latest + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') + steps: + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: v20.x + - name: Install VSCE + run: npm install -g @vscode/vsce + - name: Download package artifact + uses: actions/download-artifact@v4 + with: + name: package + - name: Publish package + run: vsce publish -i *.vsix + env: + VSCE_PAT: ${{ secrets.VSCE_PAT }}