-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from getoslash/tanmayshah/add-oslash-chrome-ext
feat: add oslash-chrome-extension
- Loading branch information
Showing
61 changed files
with
16,161 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Build and Release Extension | ||
|
||
# Generate extension builds on push to main | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_PERSONAL_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
chrome: | ||
name: building chrome extension | ||
runs-on: ubuntu-latest | ||
outputs: | ||
version: ${{ steps.version.outputs.version }} | ||
steps: | ||
- name: checking out repository ⏬ | ||
uses: actions/checkout@v3 | ||
|
||
- name: get-npm-version | ||
id: package-version | ||
uses: martinbeentjes/[email protected] | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Build Extension | ||
run: npm run build | ||
|
||
- name: Find the upcoming release version from semantic-release | ||
id: version | ||
run: | | ||
npm_config_yes=true npx semantic-release --dry-run | ||
echo ::set-output name=version::$(cat .VERSION) | ||
rm -f .VERSION | ||
- name: log extension version | ||
run: echo v${{ steps.version.outputs.version }} | ||
|
||
- name: Bump up version in package.json and manifest.json | ||
if: steps.version.outputs.version | ||
run: ./scripts/bump-version.sh ${{ steps.version.outputs.version }} ./package.json ./manifest.json | ||
|
||
- name: creating chrome-extension-local.zip | ||
run: zip -r oslash-chrome-extension.zip oslash-chrome-extension | ||
|
||
- name: upload chrome-extension-local.zip to artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: chrome-extension-local | ||
path: chrome-extension-local.zip | ||
|
||
- name: reset changes for release notes | ||
run: git checkout -- . | ||
|
||
- name: generate release notes | ||
run: npm run semantic-release | ||
|
||
- name: 📎 Attach local flavour of extension ZIP file to GitHub release | ||
if: steps.version.outputs.version | ||
continue-on-error: true | ||
uses: svenstaro/upload-release-action@v2 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: chrome-extension-local.zip | ||
tag: "@v${{ steps.version.outputs.version }}" | ||
overwrite: true |
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Logs | ||
logs | ||
*.log | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
lerna-debug.log* | ||
|
||
node_modules | ||
dist | ||
dist-ssr | ||
oslash-chrome-extension | ||
*.local | ||
|
||
# Editor directories and files | ||
.vscode/* | ||
!.vscode/extensions.json | ||
.idea | ||
.DS_Store | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
*.sw? |
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{ | ||
"manifest_version": 3, | ||
"name": "OSlash", | ||
"description": "Transform your URLs into quick, simple shortcuts", | ||
"version": "1.0", | ||
"options_page": "option.html", | ||
"action": { | ||
"default_popup": "popup.html", | ||
"default_icon": { | ||
"16": "icons/icon16.png", | ||
"32": "icons/icon32.png", | ||
"48": "icons/icon48.png", | ||
"128": "icons/icon128.png" | ||
} | ||
}, | ||
"background": { | ||
"service_worker": "src/service_worker.ts" | ||
}, | ||
"omnibox": { | ||
"keyword": "o/" | ||
}, | ||
"permissions": [ | ||
"storage", | ||
"declarativeNetRequest", | ||
"activeTab", | ||
"webRequest", | ||
"favicon" | ||
], | ||
"host_permissions": [ | ||
"*://*/*" | ||
], | ||
"icons": { | ||
"16": "icons/icon16.png", | ||
"32": "icons/icon32.png", | ||
"48": "icons/icon48.png", | ||
"128": "icons/icon128.png" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8" /> | ||
<link rel="stylesheet" href="https://rsms.me/inter/inter.css" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>OSlash - Shortcuts</title> | ||
</head> | ||
<body class="overflow-hidden"> | ||
<div id="option" class="w-full h-full"></div> | ||
<script type="module" src="/src/option.ts"></script> | ||
</body> | ||
</html> |
Oops, something went wrong.