Skip to content

Commit

Permalink
github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Muttley committed Nov 25, 2023
1 parent 41af8cf commit a6f36a6
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/npm-gulp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build CI

on:
push:
branches: [ "develop" ]
pull_request:
branches: [ "develop" ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- name: Install Dependencies
run: npm ci

- name: Build
run: npm run build
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Create Release

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- name: Install Dependencies
run: npm ci

- name: Build
run: |
npm run build
cp --force LICENSE.txt system/.
cp --force README.md system/.
SYSTEM_VERSION=$(grep -oP '(?<="version": ")[^"]+' system/system.json | tr -d '\n')
perl -pi -E "s|latest/download/jcom\\.zip|download/release-$SYSTEM_VERSION/jcom.zip|" system/system.json
echo "systemVersion=$SYSTEM_VERSION" >> $GITHUB_ENV
- run: cd system && zip -r ../jcom.zip ./*

- name: Create Version Release
id: create_version_release
uses: ncipollo/release-action@v1
with:
allowUpdates: false
name: release-${{ env.systemVersion }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
artifacts: './system/system.json, ./jcom.zip'
tag: release-${{ env.systemVersion }}

0 comments on commit a6f36a6

Please sign in to comment.