Skip to content

Commit

Permalink
Merge pull request #1 from getoslash/tanmayshah/add-oslash-chrome-ext
Browse files Browse the repository at this point in the history
feat: add oslash-chrome-extension
  • Loading branch information
Naveen Aiathurai authored Nov 2, 2023
2 parents d6aa60d + 04c57fb commit 02d2029
Show file tree
Hide file tree
Showing 61 changed files with 16,161 additions and 0 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/release-ext.yml
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
25 changes: 25 additions & 0 deletions .gitignore
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?
38 changes: 38 additions & 0 deletions manifest.json
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"
}
}
13 changes: 13 additions & 0 deletions option.html
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>
Loading

0 comments on commit 02d2029

Please sign in to comment.