diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..be23740 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,33 @@ +name: Pull request validation + +on: + pull_request: + branches: + - main + +jobs: + build: + runs-on: windows-latest + defaults: + run: + working-directory: trackaudio + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Use Node.js 20.x + uses: actions/setup-node@v4 + with: + node-version: "20.11.0" + cache: "npm" + cache-dependency-path: "trackaudio/package-lock.json" + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Package + run: npm run package diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..11339ed --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,40 @@ +name: Release + +on: + release: + types: [published] + +jobs: + build: + runs-on: windows-latest + defaults: + run: + working-directory: trackaudio + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Use Node.js 20.x + uses: actions/setup-node@v4 + with: + node-version: "20.11.0" + cache: "npm" + cache-dependency-path: "trackaudio/package-lock.json" + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Package + run: npm run package + + - name: Upload package + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + files: | + *.streamDeckPlugin diff --git a/trackaudio/.gitignore b/trackaudio/.gitignore index 6679a36..3b972e9 100644 --- a/trackaudio/.gitignore +++ b/trackaudio/.gitignore @@ -3,4 +3,7 @@ node_modules/ # Stream Deck files *.sdPlugin/bin -*.sdPlugin/logs \ No newline at end of file +*.sdPlugin/logs + +# Built packages +*.streamDeckPlugin \ No newline at end of file