71 lines
2.1 KiB
YAML
71 lines
2.1 KiB
YAML
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
|
|
name: linux-rpm-snap
|
|
|
|
on:
|
|
push:
|
|
branches: [ build, test, build-only, linux-rpm-snap ]
|
|
|
|
jobs:
|
|
build:
|
|
|
|
runs-on: ubuntu-24.04
|
|
environment: build
|
|
if: ${{ !contains(github.event.head_commit.message, '[skip build]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[skip linux]') && !contains(github.event.head_commit.message, '[skip linux2]') }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Use Node.js 24.x
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24.x
|
|
|
|
# - name: xvfb
|
|
# uses: GabrielBB/xvfb-action@v1
|
|
|
|
- name: Install rpm
|
|
run: sudo apt-get install rpm -y
|
|
|
|
- name: Install Snapcraft
|
|
uses: samuelmeuli/action-snapcraft@master
|
|
|
|
# before_script:
|
|
# - run: export DISPLAY=:99.0
|
|
# - run: sh -e /etc/init.d/xvfb start &
|
|
# - run: sleep 3
|
|
|
|
# before_install:
|
|
- run: npm config set legacy-peer-deps true
|
|
- run: npm install -g yarn
|
|
- run: npm i
|
|
# - run: npm i -D -E electron-builder@24.9.1
|
|
|
|
- name: Install R2 dependencies if needed
|
|
if: ${{ contains(github.event.head_commit.message, '[r2]') }}
|
|
run: npm i -D @aws-sdk/client-s3
|
|
|
|
# script:
|
|
- run: npm run b
|
|
|
|
- name: Run pb
|
|
run: npm run pb
|
|
|
|
- name: build
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
BUILD_NUMBER: ${{ secrets.BUILD_NUMBER }}
|
|
WORKFLOW_NAME: ${{ github.workflow }}
|
|
CF_R2_ACCOUNT_ID: ${{ secrets.CF_R2_ACCOUNT_ID }}
|
|
CF_R2_BUCKET: ${{ secrets.CF_R2_BUCKET }}
|
|
CF_R2_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
|
|
CF_R2_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_SECRET_ACCESS_KEY }}
|
|
|
|
run: node build/bin/build-linux-rpm-snap
|
|
|
|
- name: upload to snap store
|
|
env:
|
|
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAP_TOKEN }}
|
|
run: snapcraft upload --release=edge dist/*.snap
|
|
|