Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
4c0ef68
Create build-mac.yml
Mubashir-Ansari Apr 24, 2022
135cb53
Rename build-linux.yml to linux-build.yml
Mubashir-Ansari Apr 24, 2022
d16d14b
Rename build-mac.yml to mac-build.yml
Mubashir-Ansari Apr 24, 2022
46e53dd
updated actions
Mubashir-Ansari Apr 24, 2022
b3c4c5b
Update android-build.yml
Mubashir-Ansari Apr 24, 2022
9491509
Create android-publish
Mubashir-Ansari Apr 24, 2022
73a534b
Create win-build.yml
Mubashir-Ansari Apr 24, 2022
5a54dc1
Update mac-build.yml
Mubashir-Ansari Apr 24, 2022
0ea2784
Create mac-release.yml
Mubashir-Ansari Apr 24, 2022
37fb76d
Update android-build.yml
Mubashir-Ansari Apr 24, 2022
fc60ed3
Update mac-build.yml
Mubashir-Ansari Apr 24, 2022
35b0918
Update mac-release.yml
Mubashir-Ansari Apr 24, 2022
b800fda
Rename web.yml to web-build.yml
Mubashir-Ansari Apr 24, 2022
e7ed28b
Update win-build.yml
Mubashir-Ansari Apr 24, 2022
830ec52
Update mac-build.yml
Mubashir-Ansari Apr 24, 2022
edebb1f
Update mac-release.yml
Mubashir-Ansari Apr 24, 2022
8f8f8ed
Create win-relase.yml
Mubashir-Ansari Apr 24, 2022
90f028a
Update mac-release.yml
Mubashir-Ansari Apr 24, 2022
96e7f11
Update win-relase.yml
Mubashir-Ansari Apr 24, 2022
9094284
Update win-relase.yml
Mubashir-Ansari Apr 24, 2022
c991684
Update win-relase.yml
Mubashir-Ansari Apr 24, 2022
6130564
Update win-relase.yml
Mubashir-Ansari Apr 24, 2022
9a20df2
Update win-relase.yml
Mubashir-Ansari Apr 24, 2022
c2a496a
Update win-relase.yml
Mubashir-Ansari Apr 24, 2022
cff2bbd
Update win-relase.yml
Mubashir-Ansari Apr 24, 2022
2b19f3e
Update mac-build.yml
Mubashir-Ansari Apr 24, 2022
0d5df81
Update win-build.yml
Mubashir-Ansari Apr 24, 2022
9f37145
Update mac-release.yml
Mubashir-Ansari Apr 24, 2022
28fe042
Docs added
Mubashir-Ansari Apr 24, 2022
9855634
added ios with fasltane
Mubashir-Ansari Apr 26, 2022
38764a8
Create ios-build.yml
Mubashir-Ansari Apr 26, 2022
54a0440
Update ios-build.yml
Mubashir-Ansari Apr 26, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/android-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Android build
'on': pull_request
jobs:
Andorid-Publish:
Andorid-Build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> keystore.properties
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> keystore.properties

- name: Build and distribute app
- name: Build Android App
working-directory: android
env:
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
Expand All @@ -88,4 +88,4 @@ jobs:
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
gradle wrapper
bundle exec fastlane build_and_distribute
bundle exec fastlane buildAndroid
93 changes: 93 additions & 0 deletions .github/workflows/android-publish
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Android build
on:
push:
branches: [ master ]
jobs:
Andorid-Publish:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup JDK 11
uses: actions/setup-java@v2
with:
distribution: "zulu"
java-version: 11

- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7

- name: Setup android SDK
uses: android-actions/setup-android@v2

- name: Checkout
uses: actions/checkout@v2
- name: cache node module
id: myCacheStep
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install npm Dependencies
if: steps.myCacheStep.outputs.cache-hit != 'true'
run: npm install

- name: Install dependencies to support ruby project
working-directory: android
run: |
bundle config --global set deploy_platform_default x86_64-linux
bundle install

- name: Decode and create Playstore app distribution key file
working-directory: android
env:
PLAY_CONFIG_JSON: ${{secrets.PLAY_CONFIG_JSON}}
run: |
cd fastlane
mkdir certificate
cd certificate
echo "$PLAY_CONFIG_JSON" > playstore-app-distribution-key.json.b64
base64 -d -i playstore-app-distribution-key.json.b64 > playstore-app-distribution-key.json

- name: Decode and create keystore file
working-directory: android
env:
ANDROID_KEYSTORE_FILE: ${{secrets.ANDROID_KEYSTORE_FILE}}
run: |
cd app
echo "$ANDROID_KEYSTORE_FILE" > my-release-key.jks.b64
base64 -d -i my-release-key.jks.b64 > my-release-key.jks

- name: create keystore file
working-directory: android
env:
KEYSTORE_KEY_PASSWORD: ${{secrets.KEYSTORE_KEY_PASSWORD}}
KEYSTORE_KEY_ALIAS: ${{secrets.KEYSTORE_KEY_ALIAS}}
run: |
echo storeFile=my-release-key.jks >> keystore.properties
echo "storePassword=$KEYSTORE_KEY_PASSWORD" >> keystore.properties
echo "keyAlias=$KEYSTORE_KEY_ALIAS" >> keystore.properties
echo "keyPassword=$KEYSTORE_KEY_PASSWORD" >> keystore.properties

- name: Build and distribute app
working-directory: android
env:
KEYSTORE_KEY_ALIAS: ${{ secrets.KEYSTORE_KEY_ALIAS }}
KEYSTORE_KEY_PASSWORD: ${{ secrets.KEYSTORE_KEY_PASSWORD }}
run: |
ls
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
gradle wrapper
bundle exec fastlane build_and_distribute
21 changes: 21 additions & 0 deletions .github/workflows/ios-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: iOS binary build & upload
'on': push
jobs:
deploy:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2

- name: Set up ruby env
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.2
bundler-cache: true

- name: Build & upload iOS binary
working-directory: ios/App
run: |
ls
npm install
bundle install
bundle exec fastlane beta
File renamed without changes.
28 changes: 28 additions & 0 deletions .github/workflows/mac-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Linux Build on PR
'on': pull_request
jobs:
Mac-build:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: cache node module
id: myCacheStep
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
if: steps.myCacheStep.outputs.cache-hit != 'true'
run: npm install
- name: Build Using npm
run: npm run build
- name: mac package
run: npm run package-mac

34 changes: 34 additions & 0 deletions .github/workflows/mac-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Linux Build on PR
on:
push:
branches: [ master ]
jobs:
Mac-Release:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: cache node module
id: myCacheStep
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
if: steps.myCacheStep.outputs.cache-hit != 'true'
run: npm install
- name: Build Using npm
run: npm run build
- name: mac package
run: npm run package-mac
- name: Use the Upload Artifact GitHub Action
uses: actions/upload-artifact@v2
with:
name: Mac Release Fodler
path: release-builds
File renamed without changes.
28 changes: 28 additions & 0 deletions .github/workflows/win-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Linux Build on PR
# 'on': push
'on': pull_request
jobs:
Win-build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: cache node module
id: myCacheStep
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
if: steps.myCacheStep.outputs.cache-hit != 'true'
run: npm install
- name: Build Using npm
run: npm run build
- name: Win package
run: npm run package-win
36 changes: 36 additions & 0 deletions .github/workflows/win-relase.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Linux Build on PR
on:
push:
branches: [ master ]
# 'on': push
# 'on': pull_request
jobs:
Win-Release:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: cache node module
id: myCacheStep
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
if: steps.myCacheStep.outputs.cache-hit != 'true'
run: npm install
- name: Build Using npm
run: npm run build
- name: win package
run: npm run package-win
- name: Use the Upload Artifact GitHub Action
uses: actions/upload-artifact@v2
with:
name: Windows Release Folder
path: release-builds
54 changes: 51 additions & 3 deletions Docs/LINUX.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ Run npm install
npm install
```

Firstly build the project before building the package.

```sh
npm run build
```

Install snapcraft for releasing .snap of your electron app to Snapcraft

```sh
Expand All @@ -38,13 +44,13 @@ Then set "name" key with registered app name in ./package.json
Also set "name" key with registered app name in snap/snapcraft.yaml
![](images/../../images/snapcraft.png)

Run npm run electron:package to build .snap file of your Electron App
Run npm run package-linux to build .snap file of your Electron App

```sh
npm run package-linux
```

A "release" folder will be created in the root directory of your project with .snap file of your electron app.
A "release-builds" folder will be created in the root directory of your project having linux folder with .snap file of your electron app.

Return to the terminal and the location of your .snap file ("release" folder). You now need to authenticate the snapcraft command using your Snapcraft developer account credentials. This can be accomplished with the following:

Expand All @@ -66,13 +72,55 @@ You can also install your app via:
sudo snap install <app-name>
```

### Actions
## Actions

This is a Github Action that can be used to publish [snap
packages](https://snapcraft.io) to the Snap Store built by [snapcore](https://github.com/snapcore/action-publish).

![](images/../../images/action.png)

Actions for Linux:

```sh
name: Linux Deploy on Merge
on:
push:
branches: [ master ]
jobs:
Linux-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: cache node module
id: myCacheStep
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Dependencies
if: steps.myCacheStep.outputs.cache-hit != 'true'
run: npm install
- name: Build Using npm
run: node_modules/.bin/ng build
- name: snap package
run: npm run package-linux
- uses: actions/checkout@v2
- uses: snapcore/action-build@v1
id: build
- uses: snapcore/action-publish@v1
with:
store_login: ${{ secrets.STORE_LOGIN }}
snap: ${{ steps.build.outputs.snap }}
release: edge
```

This action is already written in [.github/workflows/sanpcraft.yaml](https://github.com/TelicSolutionsInc/AngularBoilerplate/blob/master/.github/workflows/deploy-linux.yml), you have to first produce data using command below:

```sh
Expand Down
Loading