Skip to content

Commit

Permalink
CI: add commit sha and upload artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
chrmod committed Sep 6, 2023
1 parent 8198b56 commit 4be2d3c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/upload-builds-mv3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@ jobs:
run: npm ci
working-directory: .
- name: Build packages
run: npm run package
run: npm run package -- --sha
- name: Upload builds
uses: actions/upload-artifact@v3
id: upload
with:
name: builds
path: extension-manifest-v3/web-ext-artifacts/*
- name: Comment PR
uses: thollander/actions-comment-pull-request@v2
with:
Expand Down
12 changes: 9 additions & 3 deletions extension-manifest-v3/scripts/package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@

set -e

SHA=''
for val in $@; do
if [ $val == '--sha' ]; then
SHA=$(git rev-parse --short HEAD)
fi
done

VERSION=$(node -p "require('./package.json').version")

for PLATFORM in firefox chrome edge opera
do
for PLATFORM in firefox chrome edge opera; do
npm run build -- $PLATFORM --silent
npm exec web-ext -- build \
--overwrite-dest \
-n ghostery-$PLATFORM-$VERSION.zip
-n ghostery-$PLATFORM-$VERSION$([ $SHA ] && echo "-$SHA").zip
done

0 comments on commit 4be2d3c

Please sign in to comment.