1- name : Build and Release OpenStack Profile Switcher
1+ name : Build and Release OpenStack Project Switcher
22
33on :
44 push :
@@ -37,24 +37,37 @@ jobs:
3737 echo "VERSION=$VERSION" >> $GITHUB_ENV
3838 echo "Using version: $VERSION"
3939
40+ - name : Set manifest's version to $VERSION
41+ run : |
42+ if [[ ${VERSION} =~ [1-9][0-9]*\.[0-9]+\.[0-9]+ ]]; then
43+ sed -r -i "s/\"version\": \"[1-9][0-9]*\.[0-9]+\.[0-9]+\"/\"version\": \"${VERSION}\"/" manifest.json
44+ fi
45+
4046 - name : Prepare Chrome extension zip
4147 run : |
42- mkdir -p dist
43- zip -r dist /openstack-profile -switcher-chrome-${VERSION}.zip \
48+ mkdir -p upload
49+ zip -r upload /openstack-project -switcher-chrome-${VERSION}.zip \
4450 manifest.json popup/ images/ options/
4551
46- - name : Prepare Firefox extension xpi
52+ - name : Install web-ext
53+ run : npm install --global web-ext
54+
55+ - name : Sign Firefox Add-on
56+ env :
57+ WEBEXT_API_KEY : ${{ secrets.AMO_JWT_ISSUER }}
58+ WEBEXT_API_SECRET : ${{ secrets.AMO_JWT_SECRET }}
4759 run : |
48- cd . # root of repository
49- zip -r -FS dist/openstack-profile-switcher-firefox-${VERSION}.xpi \
50- manifest.json popup images options \
51- --exclude '*.git*' --exclude '*.DS_Store*'
60+ web-ext sign --source-dir=./ \
61+ --channel=unlisted \
62+ --artifacts-dir=upload \
63+ --api-key=${WEBEXT_API_KEY} \
64+ --api-secret=${WEBEXT_API_SECRET}
5265
5366 - name : Upload artifacts for debugging
5467 uses : actions/upload-artifact@v4
5568 with :
56- name : OpenStack-Profile -Switcher-Extensions
57- path : dist /
69+ name : OpenStack-Project -Switcher-Extensions
70+ path : upload /
5871
5972 release :
6073 needs : build
@@ -64,12 +77,12 @@ jobs:
6477 - name : Download build artifacts
6578 uses : actions/download-artifact@v4
6679 with :
67- name : OpenStack-Profile -Switcher-Extensions
80+ name : OpenStack-Project -Switcher-Extensions
6881 path : dist
6982
7083 - name : Upload release assets
7184 uses : softprops/action-gh-release@v1
7285 with :
73- files : dist /*
86+ files : upload /*
7487 env :
7588 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments