Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: auto generate .crx pre-releases #66

Merged
merged 7 commits into from
Mar 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
41 changes: 41 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# This is a basic workflow to help you get started with Actions

name: pre-release

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
pre-release:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

# Runs commands using the runners shell
- name: build
run: |
yarn install
npm run build

- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Development Build"
files: |
release/hypertrons.crx
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
# production
/build

# release
/release

# jetbrains
/.idea

Expand All @@ -22,6 +25,9 @@
.env.test.local
.env.production.local

# yarn lock file
yarn.lock

# secrets
secrets.*.js

Expand Down
28 changes: 28 additions & 0 deletions build.pem
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQDn0xtgbJowOoTC
ZnzkcIdFLXnmB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V4LpEDAFD3JWss3UAZi+BQgLlupkpxmcRVZ+VYsdTTJrs8G1mFe7jinvId2Nfd
WWz/dZ1HhqNZ5xG5uqV5nkpBCYMMKEF3ACPQtRnrgkXBhD9jkiWDAnsJAoGAbC01
bg/QdkMiNkEl7zbOzC6TdQTDM0K8xdTqpaukAIbdR9AuXh0cm6NL7Wkm2Uv+kjri
JgLFotH+rPysx1hhh0UbXbpuGg30Msajo3J09ukaRJxqG7TRWNevi0aiJHwZJCmB
TdVoGwpTPBWGXZb4Lx+5vCiggOxwAg/mKQsfhSUCgYAwN9aFL4GhFaQOBGcxUe1u
BhXt7qnxP2gNp4BKe/UnA6+uRk3G1woWG+u/RkUwGJ15uEYirAVACi8TTeU6C/8r
qh9jhxkU++bXxJ5Fc8x97e5w+A7pSIcCPBRBL68AZn16Bayslnk5/79Lw7kfm/D5
Z2+EeXujkGxHSt/6mP4zXA==
-----END PRIVATE KEY-----
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"babel-preset-react-app": "^9.1.2",
"clean-webpack-plugin": "^3.0.0",
"copy-webpack-plugin": "^5.1.1",
"crx-webpack-plugin": "^0.1.6",
"css-loader": "^3.4.2",
"eslint": "^6.8.0",
"eslint-config-react-app": "^5.2.1",
Expand Down
9 changes: 8 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ env = require('./utils/env'),
{ CleanWebpackPlugin } = require('clean-webpack-plugin'),
CopyWebpackPlugin = require('copy-webpack-plugin'),
HtmlWebpackPlugin = require('html-webpack-plugin'),
WriteFilePlugin = require('write-file-webpack-plugin');
WriteFilePlugin = require('write-file-webpack-plugin'),
CrxWebpackPlugin = require("crx-webpack-plugin");

// load the secrets
var alias = {
Expand Down Expand Up @@ -160,6 +161,12 @@ var options = {
chunks: ['popup'],
}),
new WriteFilePlugin(),
new CrxWebpackPlugin({
keyFile: 'build.pem',
contentPath: 'build',
outputPath: 'release',
name: 'hypertrons'
})
],
};

Expand Down
Loading