Skip to content

Commit

Permalink
Add action to validate build on push/PRs, use Node.js 22 (#154)
Browse files Browse the repository at this point in the history
Co-authored-by: arkon <[email protected]>
  • Loading branch information
arkon and arkon authored Dec 19, 2024
1 parent 4438a8a commit 50464dc
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 5 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build
on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'yarn'

- name: Install modules
run: yarn

- name: Build
run: yarn build
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/main.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,28 @@ on:
release:
types:
- released

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- uses: c-hive/gha-yarn-cache@v1
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'yarn'

- name: Install modules
run: yarn

- name: Build extensions
run: |
VERSION=$(echo -n ${{ github.ref }} | sed 's/[refs\/tagv]//g') yarn build
yarn package
- name: Upload Chrome package to release
uses: svenstaro/upload-release-action@v2
with:
Expand All @@ -25,6 +33,7 @@ jobs:
asset_name: HyperChat-Chrome.zip
tag: ${{ github.ref }}
overwrite: true

- name: Upload Firefox package to release
uses: svenstaro/upload-release-action@v2
with:
Expand Down
2 changes: 2 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[tools]
node = "22"

0 comments on commit 50464dc

Please sign in to comment.