Skip to content

🐛 Fix Libération published date time used (#264) #182

🐛 Fix Libération published date time used (#264)

🐛 Fix Libération published date time used (#264) #182

Workflow file for this run

name: Sign webextension
on:
push:
branches: master
paths: [ "ophirofox/**", ".github/workflows/main.yml" ]
defaults:
run:
working-directory: ./ophirofox
jobs:
publish-to-amo:
name: Build and publish the extension
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '20'
- run: npm install --global web-ext
- id: version
run: echo OPHIROFOX_VERSION=$(jq -r ".version + \".$(($(date +%s)/65535)).$(($(date +%s)%65535))\"" < manifest.json) >> $GITHUB_ENV
- run: jq ".version |= \"$OPHIROFOX_VERSION\"" < manifest.json > manifest.json.tmp && mv manifest.json.tmp manifest.json
- run: web-ext lint --self-hosted --warnings-as-errors
- run: web-ext build
- run: web-ext sign --channel=unlisted
env:
WEB_EXT_API_KEY: ${{ secrets.AMO_JWT_ISSUER }}
WEB_EXT_API_SECRET: ${{ secrets.AMO_JWT_SECRET }}
- run: ls -lah ./web-ext-artifacts
- run: cp $PWD/web-ext-artifacts/*xpi ../ophirofox.xpi
- name: Create the mobile version (with all permissions asked on installation and no optional permissions)
run: |
jq '.permissions += .optional_permissions | .optional_permissions = []' manifest.json > manifest.mobile.json
mv manifest.mobile.json manifest.json
web-ext build --overwrite-dest
cp $PWD/web-ext-artifacts/*zip ../ophirofox.mobile.zip
- run: node ../update-manifest.js | tee /tmp/update_manifest.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: git log -1 --pretty=%B | tee /tmp/changelog.txt
- name: Create Release
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ env.OPHIROFOX_VERSION }}
name: Release ${{ env.OPHIROFOX_VERSION }}
draft: false
prerelease: false
files: |
ophirofox.xpi
ophirofox.mobile.zip
/tmp/update_manifest.json
/tmp/changelog.txt