Skip to content

chore(uhk-smart-macro): rebuild package-lock.json (#2721) #2582

chore(uhk-smart-macro): rebuild package-lock.json (#2721)

chore(uhk-smart-macro): rebuild package-lock.json (#2721) #2582

Workflow file for this run

name: CI
on:
push:
branches:
- master
tags:
- 'v*'
pull_request:
branches:
- master
release:
types:
- created
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
steps:
- uses: actions/checkout@v4
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: npm
- name: Install dependencies
run: npm install
- name: Run linters
run: npm run lint
- name: Run Build
run: npm run build
- name: Run Build Web
run: npm run build:web
- name: Run test
run: npm test
- name: Release
run: npm run release
env:
CERT_KEY: ${{ secrets.CERT_KEY }}
CERT_IV: ${{ secrets.CERT_IV }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASS }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: List dist folder on Linux and Mac
if: runner.os == 'macOS' || runner.os == 'Linux'
run: ls -la dist
- name: Upload Mac installer artifact
if: runner.os == 'macOS'
uses: actions/upload-artifact@v4
with:
name: UHK.Agent-mac-installer
path: dist/UHK.Agent-*-mac.dmg
compression-level: 0
retention-days: 30
- name: Upload Linux AppImage artifact
if: runner.os == 'Linux'
uses: actions/upload-artifact@v4
with:
name: UHK.Agent-linux-x86_64.AppImage
path: dist/UHK.Agent-*-linux-x86_64.AppImage
compression-level: 0
retention-days: 30
- name: List dist folder on Windows
if: runner.os == 'Windows'
run: dir dist
- name: Upload Windows installer artifacts
if: runner.os == 'Windows'
uses: actions/upload-artifact@v4
with:
name: UHK.Agent-windows-installers
path: dist/UHK.Agent-*-win*.exe
compression-level: 0
retention-days: 30
- name: Run build-archiver
if: github.ref == 'refs/heads/master'
uses: UltimateHackingKeyboard/build-archiver@v0.0.4
with:
FILE_PATTERN: "dist/UHK.Agent-*-linux-x86_64.AppImage\ndist/UHK.Agent-*-mac.dmg\ndist/UHK.Agent-*-win*.exe"
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
S3_ACCESS_KEY: ${{ secrets.UHK_BUILD_ARCHIVER_AWS_ACCESS_SECRET }}
S3_ACCESS_KEY_ID: ${{ secrets.UHK_BUILD_ARCHIVER_AWS_ACCESS_KEY }}
S3_BUCKET: "uhk-build-archives"
S3_KEY_PREFIX: "agent/"
S3_REGION: "eu-central-1"
# Update GH release notes
- name: Strip `v` from git tag and
if: github.ref_type == 'tag' && runner.os == 'Linux'
run: |
TAG_VERSION=${{ github.ref_name }}
TAG_VERSION=${TAG_VERSION#v}
echo "TAG_VERSION=$TAG_VERSION" >> $GITHUB_ENV
- name: Extract changelog
id: changelog
if: github.ref_type == 'tag' && runner.os == 'Linux'
env:
VERSION: ${{ env.TAG_VERSION }}
run: |
cd firmware
DELIMITER=$(openssl rand -hex 16)
echo "content<<$DELIMITER" >> $GITHUB_OUTPUT
sed -n "/^## \\[${VERSION}\\]/,/^## \\[/p" CHANGELOG.md | sed '$d' | tail -n +3 >> $GITHUB_OUTPUT
echo "$DELIMITER" >> $GITHUB_OUTPUT
- name: Update GH release description
if: github.ref_type == 'tag' && runner.os == 'Linux'
run: gh release edit ${{ github.ref_name }} --notes="${{ steps.changelog.outputs.content }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# end Update GH release notes