Skip to content

Commit

Permalink
Refactor build workflow and add branch validation
Browse files Browse the repository at this point in the history
  • Loading branch information
mauro-balades committed Oct 11, 2024
1 parent a01a6d0 commit 69020cc
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 16 deletions.
42 changes: 41 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,52 @@ jobs:
echo "GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}"
echo "GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}"
check-build-is-correct:
runs-on: ubuntu-latest
needs: [debug-inputs]
steps:
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20

- uses: actions/checkout@v4
with:
submodules: recursive
token: ${{ secrets.DEPLOY_KEY }}

- name: Check if correct branch
run: |
echo "Checking if we are on the correct branch"
git branch
git status
git branch --show-current
if [[ $(git branch --show-current) != ${{ inputs.update_branch }} ]]; then
echo ">>> Branch mismatch"
exit 1
else
echo ">>> Branch matches"
fi
- name: Check if branch is up to date
run: |
echo "Checking if branch is up to date"
git fetch
git pull
git status
if [[ $(git status) == *"Your branch is up to date with"* ]]; then
echo ">>> Branch is up to date"
else
echo ">>> Branch is not up to date"
exit 1
fi
build-data:
permissions:
contents: write
name: Generate build data
runs-on: ubuntu-latest
needs: debug-inputs
needs: check-build-is-correct
outputs:
build_date: ${{ steps.data.outputs.builddate }}
version: ${{ steps.data.outputs.version }}
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ Zen is currently built using firefox version `131.0.2`!

- Check out the latest [release notes](https://zen-browser.app/release-notes)!

# Contribution

Zen is an open-source project, and we welcome contributions from the community!

- Check out the [contribution guidelines](./docs/contribute.md)!

# Performance

Zen is built with performance in mind, and we have optimized the browser to be as fast as possible!
Expand Down
18 changes: 18 additions & 0 deletions docs/contribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

# Branch Structure

The repository is structured as follows:

```
main (default branch)
|
├── twilight (beta testing branch)
|
├── alpha (stable branch)
|
└── ... (other branches)
```

You, as a contributor, should create a pull request to the `main` branch. The pull request will be reviewed and merged into the `twilight` branch. After the beta testing phase, the `twilight` branch will be merged into the `stable` branch.

This way, we can push changes to the `stable` branch with quick fixes without having new features that are not tested yet, in case an emergency fix is needed.
2 changes: 1 addition & 1 deletion src/browser/base/content/zen-components
32 changes: 18 additions & 14 deletions src/browser/base/content/zen-styles/zen-workspaces.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
position: relative;

&:not([as-button='true']) {
--zen-workspaces-strip-background-color: color-mix(in srgb, var(--zen-colors-border) 20%, transparent 80%);
--toolbarbutton-hover-background: var(--toolbarbutton-hover-background) !important;
--toolbarbutton-hover-background: transparent !important;
border-radius: var(--zen-button-border-radius) !important;
background: var(--zen-workspaces-strip-background-color) !important;
background: transparent;
padding: 5px;
appearance: unset !important;
height: fit-content;
Expand All @@ -28,17 +27,22 @@
opacity: 0.6;
}

&[active='true']::after {
content: '';
position: absolute;
width: 4px;
border-radius: 99px;
height: 4px;
background: var(--zen-primary-color);
bottom: -2px;
left: 50%;
transform: translateX(-50%);
animation: zen-workspaces-button-active 0.1s ease-in-out;
&:not([active='true']) {
&::after {
content: '';
position: absolute;
width: 4px;
border-radius: 99px;
height: 4px;
background: color-mix(in srgb, var(--zen-primary-color) 10%, light-dark(#000, #fff) 90%);
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
}

& .zen-workspace-icon {
display: none;
}
}
}
}
Expand Down

0 comments on commit 69020cc

Please sign in to comment.