Skip to content

Commit

Permalink
add implementing CI/CD for Linux packages ! (#120)
Browse files Browse the repository at this point in the history
* add support for building a .flatpak package

* upgrade electron-builder

* test CI/CD

* test CI/CD

* test CI/CD

* test CI/CD

* test CI/CD

* test CI/CD

* test

* test CI/CD

* test CI/CD

* test CI/CD

* test CI/CD

* test CI/CD

* test CI/CD

* .......

* test

* test

* test

* Add CI/CD Implementing

test CI/CD

test CI/CD

test CI/CD

test CI/CD

test CI/CD

test

test CI/CD

test CI/CD

test CI/CD

test CI/CD

test CI/CD

test CI/CD

.......

test

test

test

test CI/CD

* debug

* revert package.json

* debug

* test

* test CI/CD

* Update package.json

* Elevate privileges for GITHUB_TOKEN

---------

Co-authored-by: David  Morais <davidmorais92@gmail.com>
  • Loading branch information
jexjws and davidsmorais authored Nov 28, 2024
1 parent 29c84ee commit 1ec1793
Show file tree
Hide file tree
Showing 3 changed files with 519 additions and 282 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build/release

on:
push:

permissions:
contents: write

jobs:
BuildOrRelease:
# the type of machine to run the job on
runs-on: ${{ matrix.os }}

# create a build matrix for jobs
strategy:
matrix:
os: [ubuntu-latest, windows-latest]

steps:
- name: ⚙️ Check out Git repository
uses: actions/checkout@v4

- name: ⚙️📦️ Build(Linux)
if: matrix.os == 'ubuntu-latest'
run: |
docker run --rm \
--env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \
--env ELECTRON_CACHE="/root/.cache/electron" \
--env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \
-v ${PWD}:/project \
-v ${PWD##*/}-node-modules:/project/node_modules \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder \
/bin/bash -c "yarn install && yarn icons && yarn run electron-builder --publish never"
- name: ⚙️📦️ Build(Windows)
if: matrix.os == 'windows-latest'
run: yarn install && yarn icons && yarn run electron-builder --publish never

- name: 🌐️ Upload results
uses: actions/upload-artifact@v4
with:
name: binary-${{ matrix.os }}
path: |
dist/*.AppImage
dist/*.pacman
dist/*.deb
dist/*.snap
dist/*.rpm
dist/*.flatpak
dist/*.exe
- name: 🚀️ release
uses: softprops/action-gh-release@v2
with:
files: "dist/*"
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
"devDependencies": {
"electron": "^22.3.25",
"electron-builder": "^23.6.0",
"electron-builder": "^24.13.3",
"electron-icon-maker": "^0.0.5",
"stylelint": "^14.9.1",
"xo": "^0.53.1"
Expand Down
Loading

0 comments on commit 1ec1793

Please sign in to comment.