From f0008c3ec154bead25da5ecf29a23e87ef9ab802 Mon Sep 17 00:00:00 2001 From: AMJ <69196954+ThisAMJ@users.noreply.github.com> Date: Sun, 13 Oct 2024 14:03:59 +1100 Subject: [PATCH] feat: workflows maybe --- .github/workflows/CD.yaml | 28 ++++++++++++++++++++++++++++ .github/workflows/CI.yaml | 38 ++++++++++++++++++++++++++++++++++++++ README.md | 2 ++ 3 files changed, 68 insertions(+) create mode 100644 .github/workflows/CD.yaml create mode 100644 .github/workflows/CI.yaml diff --git a/.github/workflows/CD.yaml b/.github/workflows/CD.yaml new file mode 100644 index 0000000..150563e --- /dev/null +++ b/.github/workflows/CD.yaml @@ -0,0 +1,28 @@ +name: CD + +on: + push: + tags: '*' + +jobs: + release: + name: Release + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + + - name: Install Dependencies + run: npm install + + - name: Install VSCE + run: npm install -g @vscode/vsce + + - name: Publish + env: + MARKETPLACE_ACCESS_TOKEN: ${{ secrets.MARKETPLACE_ACCESS_TOKEN }} + run: vsce publish --skip-license -p $MARKETPLACE_ACCESS_TOKEN diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml new file mode 100644 index 0000000..f367816 --- /dev/null +++ b/.github/workflows/CI.yaml @@ -0,0 +1,38 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + build: + name: Build + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + + - name: Install Dependencies + run: npm install + + - name: Install VSCE + run: npm install -g @vscode/vsce + + - name: Build + run: vsce package -o p2tas.vsix --skip-license + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + with: + name: p2tas + path: p2tas.vsix + if-no-files-found: error diff --git a/README.md b/README.md index a4fc534..1e76c42 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Portal 2 TAS Tools +[![CI](https://github.com/p2sr/p2tas-lang/workflows/CI/badge.svg)](https://github.com/p2sr/p2tas-lang/actions?query=workflow%3ACI+branch%3Amaster) + Syntax highlighting, snippets and autocompletion for the Portal 2 TAS files, using the [SourceAutoRecord](https://github.com/p2sr/SourceAutoRecord) plugin. ## Installation