Skip to content

Commit

Permalink
chore: Integrate GitHub actions (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
kunalnagar authored Aug 2, 2020
1 parent da46015 commit 3cb309d
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 22 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Build encrypt0r

on:
push:
branches:
- '**'
tags-ignore:
- '*.*'

jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Install npm dependencies
run: npm install
- name: Install windows dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt update
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo apt install software-properties-common
sudo apt-add-repository 'deb http://dl.winehq.org/wine-builds/ubuntu/ bionic main'
wget -qO- https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/Release.key | sudo apt-key add -
sudo sh -c 'echo "deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/ ./" > /etc/apt/sources.list.d/obs.list'
sudo apt update
sudo apt-get install -y --install-recommends winehq-devel
sudo apt-get install -y fakeroot
- name: Create build
run: npm run build
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release encrypt0r

on:
release:
types: [published]

jobs:
release:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Install npm dependencies
run: npm install
- name: Install windows dependencies
run: |
sudo dpkg --add-architecture i386
sudo apt update
wget -qO- https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -
sudo apt install software-properties-common
sudo apt-add-repository 'deb http://dl.winehq.org/wine-builds/ubuntu/ bionic main'
wget -qO- https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/Release.key | sudo apt-key add -
sudo sh -c 'echo "deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/ ./" > /etc/apt/sources.list.d/obs.list'
sudo apt update
sudo apt-get install -y --install-recommends winehq-devel
sudo apt-get install -y fakeroot
- name: Create release files
run: npm run release
- name: Upload release files
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: release-builds/*.zip
tag: ${{ github.ref }}
file_glob: true
20 changes: 0 additions & 20 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "encrypt0r",
"version": "3.2.5",
"version": "3.2.6",
"description": "A simple way to encrypt and decrypt your files",
"main": "main.js",
"scripts": {
Expand All @@ -16,7 +16,8 @@
"build-linux-deb": "./node_modules/.bin/electron-installer-debian --src release-builds/encrypt0r-linux-x64/ --dest release-builds/ --arch amd64 --config debian.json",
"zip-linux-deb": "zip -r release-builds/encrypt0r-linux-deb.zip release-builds/*.deb",
"dev": "./node_modules/.bin/grunt build & ./node_modules/.bin/grunt watch & ./node_modules/.bin/electron .",
"build": "npm run build-grunt && npm run build-mac-x64 && npm run zip-mac-x64 && npm run build-win-x86 && npm run zip-win-x86 && npm run build-win-x64 && npm run zip-win-x64 && npm run build-linux-x64 && npm run zip-linux-x64 && npm run build-linux-deb && npm run zip-linux-deb"
"build": "npm run build-grunt && npm run build-mac-x64 && npm run build-win-x86 && npm run build-win-x64 && npm run build-linux-x64 && npm run build-linux-deb",
"release": "npm run build-grunt && npm run build-mac-x64 && npm run zip-mac-x64 && npm run build-win-x86 && npm run zip-win-x86 && npm run build-win-x64 && npm run zip-win-x64 && npm run build-linux-x64 && npm run zip-linux-x64 && npm run build-linux-deb && npm run zip-linux-deb"
},
"repository": "https://github.com/kunalnagar/encrypt0r",
"keywords": [
Expand Down

0 comments on commit 3cb309d

Please sign in to comment.