Skip to content

Commit

Permalink
Merge pull request #2 from jerinphilip/build-workflow-on-github
Browse files Browse the repository at this point in the history
  • Loading branch information
jerinphilip authored Nov 4, 2021
2 parents 02b7a0f + 2e2021f commit 82eaf7c
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 1 deletion.
66 changes: 66 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: Build Extension

on:
push:
branches: [ main, ci-sandbox ]
tags: ['v[0-9]+.[0-9]+.[0-9]+']
pull_request:
branches: [ '**' ]

jobs:
extension-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: recursive

- name: Set up dependencies
run: |
sudo apt-get install -y doxygen nodejs
npm install --global yarn
- name: Get version information
id: version
working-directory: src
run: |
echo "::set-output name=semantic::$(node -p require\(\'../package.json\'\).version)"
echo "::set-output name=sha_short::$(echo ${{ github.sha }} | cut -c -7)"
- name: Just echoes the version
run: |
echo ${{ steps.version.outputs.semantic }}+${{ steps.version.outputs.sha_short }}
- name: Install yarn requirements
run: |
yarn install --frozen-lockfile
yarn bergamot-translator:download-and-import
# TODO: Setup Checks
yarn ci:install-firefox:linux
# Don't need telemetry.
- name: Build Extension Firefox Infobar UI
run: |
yarn build:firefox-infobar-ui
- name: Build Extension Firefox Cross Browser UI
run: |
yarn build:cross-browser-ui:firefox
- name: Build Extension Chrome Cross Browser UI
run: |
yarn build:cross-browser-ui:chrome
- name: Upload built extensions
uses: actions/upload-artifact@v2
with:
name: bergamot-browser-extension-${{ steps.version.outputs.semantic }}+${{ steps.version.outputs.sha_short }}
path: |
dist/production/firefox/firefox-infobar-ui/firefox-translations-${{ steps.version.outputs.semantic }}.xpi
dist/production/firefox/cross-browser-ui/bergamot-browser-extension-${{ steps.version.outputs.semantic }}-firefox-cross-browser-ui.xpi
dist/production/chrome/cross-browser-ui/bergamot-browser-extension-${{ steps.version.outputs.semantic }}-chrome-cross-browser-ui.zip
if-no-files-found: error


2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "firefox-translations",
"description": "Firefox Translations",
"version": "0.4.4",
"version": "0.4.5",
"author": "Mozilla",
"engines": {
"npm": "please-use-yarn",
Expand Down

0 comments on commit 82eaf7c

Please sign in to comment.