diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 00000000..1c0ab04d --- /dev/null +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 7ed83923..f29e93ef 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/release.yml similarity index 81% rename from .github/workflows/main.yml rename to .github/workflows/release.yml index 667ea21c..1fd7c6a8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/release.yml @@ -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: @@ -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: diff --git a/mise.toml b/mise.toml new file mode 100644 index 00000000..6a0493c6 --- /dev/null +++ b/mise.toml @@ -0,0 +1,2 @@ +[tools] +node = "22"