From f0d80fa9dbcbf4aac2ada8f31fdeff6c5769e40c Mon Sep 17 00:00:00 2001 From: Neil Enns Date: Mon, 13 May 2024 18:36:51 -0700 Subject: [PATCH 1/6] Add build process Fixes #1 --- trackaudio/.github/workflows/ci.yaml | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 trackaudio/.github/workflows/ci.yaml diff --git a/trackaudio/.github/workflows/ci.yaml b/trackaudio/.github/workflows/ci.yaml new file mode 100644 index 0000000..1ef2c37 --- /dev/null +++ b/trackaudio/.github/workflows/ci.yaml @@ -0,0 +1,30 @@ +name: Build + +on: + pull_request: + branches: + - main + +jobs: + build: + runs-on: windows-latest + + 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: "package-lock.json" + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Package + run: npm run package From 542aa08d04ec181bfe4fe23e62b02bb8a4138a73 Mon Sep 17 00:00:00 2001 From: Neil Enns Date: Mon, 13 May 2024 18:38:56 -0700 Subject: [PATCH 2/6] Fix location of file --- {trackaudio/.github => .github}/workflows/ci.yaml | 3 +++ 1 file changed, 3 insertions(+) rename {trackaudio/.github => .github}/workflows/ci.yaml (89%) diff --git a/trackaudio/.github/workflows/ci.yaml b/.github/workflows/ci.yaml similarity index 89% rename from trackaudio/.github/workflows/ci.yaml rename to .github/workflows/ci.yaml index 1ef2c37..00e1cde 100644 --- a/trackaudio/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -8,6 +8,9 @@ on: jobs: build: runs-on: windows-latest + defaults: + run: + working-directory: trackaudio steps: - name: Checkout code From a9bfd673b1e68998eb48673680115affb73d2b7a Mon Sep 17 00:00:00 2001 From: Neil Enns Date: Mon, 13 May 2024 18:40:21 -0700 Subject: [PATCH 3/6] Fix cache path --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 00e1cde..10a27c4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -21,7 +21,7 @@ jobs: with: node-version: "20.11.0" cache: "npm" - cache-dependency-path: "package-lock.json" + cache-dependency-path: "trackaudio/package-lock.json" - name: Install dependencies run: npm ci From 81269a51a4cff475f5b04b0e9f2688839005965e Mon Sep 17 00:00:00 2001 From: Neil Enns Date: Mon, 13 May 2024 18:46:27 -0700 Subject: [PATCH 4/6] Add build process Fixes #1 --- .github/workflows/ci.yaml | 2 +- .github/workflows/release.yaml | 41 ++++++++++++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 10a27c4..be23740 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,4 +1,4 @@ -name: Build +name: Pull request validation on: pull_request: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..3231797 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,41 @@ +name: Release + +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 + + - name: Upload package + uses: softprops/action-gh-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + files: | + *.sdPlugin From d55098062b866b01b91bf84df146531c05c5968e Mon Sep 17 00:00:00 2001 From: Neil Enns Date: Mon, 13 May 2024 18:52:35 -0700 Subject: [PATCH 5/6] Add release script. I wonder if it'll work. --- .github/workflows/release.yaml | 2 +- trackaudio/.gitignore | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 3231797..b86f6fb 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -38,4 +38,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: files: | - *.sdPlugin + *.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 From 743054a0adcdc09e7a206a3868de48a42fa3192d Mon Sep 17 00:00:00 2001 From: Neil Enns Date: Mon, 13 May 2024 18:53:33 -0700 Subject: [PATCH 6/6] Fix trigger for release action --- .github/workflows/release.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index b86f6fb..11339ed 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,9 +1,8 @@ name: Release on: - pull_request: - branches: - - main + release: + types: [published] jobs: build: