Skip to content

Commit

Permalink
Introduce make-rel-ios
Browse files Browse the repository at this point in the history
  • Loading branch information
OctoNezd authored Jan 3, 2024
1 parent 5f43a1c commit 6e2503b
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/make-rel-ios.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Build WebExtension
on:
push:
branches: ["main", "ios-ci"]
paths-ignore:
- "*.md"
jobs:
build:
permissions:
contents: write
name: Build for iOS
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Copy certificate from secrets
if: ${{ matrix.make_target == 'chrome' }}
run: 'echo "$CHROME_PK" > cert.pem'
shell: bash
env:
CHROME_PK: ${{secrets.CHROME_PK}}
- name: Install yarn
run: |-
curl -fsSL --create-dirs -o $HOME/bin/yarn \
https://github.com/yarnpkg/yarn/releases/download/v1.22.19/yarn-1.22.19.js
chmod +x $HOME/bin/yarn
echo "$HOME/bin" >> $GITHUB_PATH
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"
- name: Install dependencies
run: |
yarn install --immutable
- name: Build webextension
run: yarn run wp-build --env BROWSER=safari
- name: Build IPA
run: |
cd dist
xcrun safari-web-extension-converter . --ios-only --force --no-prompt --no-open
ls
cat *.xcodproj
xcodebuild clean archive -sdk iphonesimulator -destination 'generic/platform=iOS Simulator'
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ const userScriptBanner = `// ==UserScript==
`;

module.exports = (env, argv) => {
if (env.BROWSER === "firefox") {
console.log("removing update url cause firefox");
if (env.BROWSER === "firefox" || env.BROWSER === "safari") {
console.log("removing update url cause not chrome");
delete manifest.update_url;
}
const webpackConfig = {
Expand Down

0 comments on commit 6e2503b

Please sign in to comment.