-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
workflow: display pluging info for nix
- Loading branch information
1 parent
7e0ede3
commit cb61d4e
Showing
1 changed file
with
20 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
--- | ||
name: Build | ||
name: Releases | ||
on: | ||
push: | ||
branches: ["main"] | ||
branches: [main] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
@@ -27,25 +27,35 @@ jobs: | |
sed -i 's/const key = "";/const key = "${{ secrets.KEY }}";/' js/weather.js | ||
sed -i 's/const latitude = 0;/const latitude = ${{ secrets.LATITUDE }};/' js/weather.js | ||
sed -i 's/const longitude = 0;/const longitude = ${{ secrets.LONGITUDE }};/' js/weather.js | ||
- name: Build and Sign extension | ||
- name: Build and Sign Extension | ||
id: build | ||
env: | ||
FIREFOX_JWT_ISSUER: ${{ secrets.FIREFOX_JWT_ISSUER }} | ||
FIREFOX_JWT_SECRET: ${{ secrets.FIREFOX_JWT_SECRET }} | ||
run: | | ||
web-ext sign \ | ||
--channel=unlisted \ | ||
--api-key=$FIREFOX_JWT_ISSUER \ | ||
--api-secret=$FIREFOX_JWT_SECRET | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: firefox-extension | ||
path: web-ext-artifacts/*.xpi | ||
--api-secret=$FIREFOX_JWT_SECRET | tee >(cat) | \ | ||
grep "^Generated extension ID:" | \ | ||
xargs -I {} echo "EXTENSION_ID={}" >> $GITHUB_ENV | ||
- name: Prep Artifact | ||
run: | | ||
mv web-ext-artifacts/*.xpi web-ext-artifacts/startpage-${{ env.version }}.xpi | ||
- name: Generate SHA-256 SRI hash for xpi file | ||
id: generate_sri | ||
run: | | ||
XPI_FILE=$(ls web-ext-artifacts/*.xpi) | ||
SHA256_HASH=$(sha256sum "$XPI_FILE" | awk '{print $1}' | xxd -r -p | base64) | ||
echo "SRI_HASH=sha256-$SHA256_HASH" >> $GITHUB_ENV | ||
- name: Release | ||
uses: ncipollo/[email protected] | ||
with: | ||
tag: ${{ env.version }} | ||
artifacts: "web-ext-artifacts/*.xpi" | ||
artifacts: web-ext-artifacts/*.xpi | ||
allowUpdates: true | ||
replacesArtifacts: true | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
body: |- | ||
"${{ env.EXTENSION_ID }}" | ||
SHA-256: `${{ env.SRI_HASH }}` |