From b502987914b3248518c00f5f43751fca51cc2ef6 Mon Sep 17 00:00:00 2001 From: Jerin Philip Date: Thu, 4 Nov 2021 16:54:35 +0000 Subject: [PATCH 1/2] Update workflow file to upload artifacts --- .github/workflows/release.yml | 66 +++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..a5b75461 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 + + From 2e2021fc6a144fda24bc64400d034de3e4207f91 Mon Sep 17 00:00:00 2001 From: Jerin Philip Date: Thu, 4 Nov 2021 16:54:44 +0000 Subject: [PATCH 2/2] Bump version in package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 70e86b87..788e8636 100644 --- a/package.json +++ b/package.json @@ -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",