Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: github actions to build browser extension for pull requests #373

Merged
merged 52 commits into from
Sep 20, 2023
Merged
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
08415f3
testing action
aatmanvaidya Sep 16, 2023
9ed43d3
testing chrome
aatmanvaidya Sep 16, 2023
2df49a4
testing workflow on actions branch
aatmanvaidya Sep 16, 2023
eadb64d
updates
aatmanvaidya Sep 17, 2023
d8a9c27
test action
aatmanvaidya Sep 17, 2023
b18bb0d
Merge pull request #1 from aatmanvaidya/test-action
aatmanvaidya Sep 17, 2023
61bb9cd
upating action to run on actions branch
aatmanvaidya Sep 17, 2023
9bf746d
test action
aatmanvaidya Sep 17, 2023
77e7aea
Merge pull request #2 from aatmanvaidya/test-action
aatmanvaidya Sep 17, 2023
eec12d9
upload artifact action
aatmanvaidya Sep 17, 2023
9649e10
test
aatmanvaidya Sep 17, 2023
cad09d2
fix: upload artifact
aatmanvaidya Sep 17, 2023
2db3b3a
Merge pull request #3 from aatmanvaidya/test-action
aatmanvaidya Sep 17, 2023
c119ea6
test
aatmanvaidya Sep 17, 2023
f109d4c
Merge pull request #4 from aatmanvaidya/test-action
aatmanvaidya Sep 17, 2023
d11f058
github token
aatmanvaidya Sep 17, 2023
c46f531
github token
aatmanvaidya Sep 17, 2023
10d1e2e
updating comment to github script
aatmanvaidya Sep 17, 2023
e18b13a
fixing github comment action
aatmanvaidya Sep 17, 2023
286d418
fixing github comment action
aatmanvaidya Sep 17, 2023
2b37624
fixing github comment action
aatmanvaidya Sep 17, 2023
20e7a39
fixing github comment action
aatmanvaidya Sep 17, 2023
d58bb69
fixing github comment action
aatmanvaidya Sep 17, 2023
981a6f6
fixing github comment action
aatmanvaidya Sep 17, 2023
e974472
fixing github comment action
aatmanvaidya Sep 17, 2023
7882d02
fixing github comment action
aatmanvaidya Sep 17, 2023
d3cf74e
testing PR (#5)
aatmanvaidya Sep 17, 2023
db535f6
fixing github comment action
aatmanvaidya Sep 18, 2023
107df30
Test action (#6)
aatmanvaidya Sep 18, 2023
2cf8760
fixing github comment action
aatmanvaidya Sep 18, 2023
8a4429e
test using ocktokit
aatmanvaidya Sep 18, 2023
8080a5c
fixing github comment action
aatmanvaidya Sep 18, 2023
ea7831b
fixing github comment action
aatmanvaidya Sep 18, 2023
25794e9
fixing github comment action
aatmanvaidya Sep 18, 2023
a96338c
fixing github comment action
aatmanvaidya Sep 18, 2023
9b231c3
fixing github comment action
aatmanvaidya Sep 18, 2023
1f5b92e
fixing github comment action
aatmanvaidya Sep 18, 2023
aa51bd8
fixing github comment action
aatmanvaidya Sep 18, 2023
fb9c223
test (#7)
aatmanvaidya Sep 18, 2023
b26449d
fixing github comment action
aatmanvaidya Sep 18, 2023
6dfcc74
Merge branch 'actions' of https://github.com/aatmanvaidya/Uli into ac…
aatmanvaidya Sep 18, 2023
8af2beb
fixing github comment action
aatmanvaidya Sep 18, 2023
6b45e52
testing new actions
aatmanvaidya Sep 19, 2023
5cb1a40
updating actions
aatmanvaidya Sep 19, 2023
0a71699
final changes
aatmanvaidya Sep 19, 2023
afc362f
changing file names
aatmanvaidya Sep 19, 2023
55233d7
github action build pr review for both the browsers
aatmanvaidya Sep 19, 2023
cbab663
action checkout change
aatmanvaidya Sep 20, 2023
aaf2cd5
checking GITHUB_TOKEN
aatmanvaidya Sep 20, 2023
87e1b88
checking GITHUB_TOKEN
aatmanvaidya Sep 20, 2023
744ee4c
deleting chrome and firefox seperate github action files for build PR…
aatmanvaidya Sep 20, 2023
34e1a20
fixes
aatmanvaidya Sep 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/build-pr-review-both-browsers.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: "Build For PR Review - Both Browsers"

on:
pull_request:
branches:
- main

jobs:
chrome-publish:
name: "Build For PR Review"
runs-on: "ubuntu-latest"

steps:
- name: "Checkout Development Branch"
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}

- name: Get commit SHA
shell: bash
run: |
echo "setting variables"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
- name: "Build and Test"
run: |
cd browser-extension/plugin
ls
pwd
npm install
npm run build
mv dist/ extension-chrome/
npm run build:firefox
mv dist/ extension-firefox/
- name: "Upload dist folder as artifact"
uses: actions/upload-artifact@v3
with:
name: extension-artifcats
path: |
browser-extension/plugin/extension-firefox/
browser-extension/plugin/extension-chrome/

- name: Create PR Comment with Artifact Link
uses: actions/github-script@v5
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const artifact_url = `https://github.com/${{github.repository_owner}}/${{github.event.repository.name}}/actions/runs/${{ github.run_id }}`;
const comment_body = `🛠 Your build files are available [here](${artifact_url}).`;
await github.rest.issues.createComment({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
});
Loading