Skip to content

Commit

Permalink
chore: Release v0.0.1-alpha.16 (RSSNext#563)
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod committed Sep 22, 2024
2 parents 66c5afb + 9241c31 commit 103c2bf
Show file tree
Hide file tree
Showing 15 changed files with 314 additions and 23 deletions.
133 changes: 133 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: Nightly Release

on:
schedule:
- cron: "0 22 * * *" # Runs at 10 PM UTC every day

env:
VITE_WEB_URL: ${{ vars.VITE_WEB_URL }}
VITE_API_URL: ${{ vars.VITE_API_URL }}
VITE_IMGPROXY_URL: ${{ vars.VITE_IMGPROXY_URL }}
VITE_SENTRY_DSN: ${{ vars.VITE_SENTRY_DSN }}
VITE_POSTHOG_KEY: ${{ vars.VITE_POSTHOG_KEY }}
NODE_OPTIONS: --max-old-space-size=8192

jobs:
nightly-release:
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

permissions:
id-token: write
contents: write
attestations: write

steps:
- name: Check out Git repository
uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true

- name: Cache pnpm modules
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ matrix.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ matrix.os }}-
- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: "pnpm"

- name: Install appdmg
if: runner.os == 'macOS'
run: pnpm add -g appdmg

# ... (macOS certificate and provisioning profile setup steps) ...

- name: Install dependencies
run: pnpm i

- name: Set nightly version
run: |
# Get the current version from package.json
CURRENT_VERSION=$(node -p "require('./package.json').version")
# Remove any existing prerelease identifier (e.g., -alpha.1)
BASE_VERSION=$(echo $CURRENT_VERSION | sed -E 's/(-[a-zA-Z]+\.[0-9]+)$//')
# Generate the nightly version
NIGHTLY_DATE=$(date +'%Y%m%d')
NIGHTLY_VERSION="${BASE_VERSION}-nightly.${NIGHTLY_DATE}"
echo "NIGHTLY_VERSION=$NIGHTLY_VERSION" >> $GITHUB_ENV
# Update version in package.json
sed -i.bak -e "s/\"version\": \".*\"/\"version\": \"$NIGHTLY_VERSION\"/" package.json
echo "Updated version to $NIGHTLY_VERSION"
- name: Build
if: matrix.os != 'macos-latest'
run: pnpm build
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}

- name: Build (macOS)
if: matrix.os == 'macos-latest'
env:
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
KEYCHAIN_PATH: ${{ runner.temp }}/app-signing.keychain-db
run: pnpm build:macos

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-nightly
path: |
out/make/**/*.zip
out/make/**/*.exe
out/make/**/*.AppImage
out/make/**/*.yml
out/make/**/*.dmg
retention-days: 7

- name: Generate artifact attestation
continue-on-error: true
uses: actions/attest-build-provenance@v1
with:
subject-path: |
out/make/**/*.dmg
out/make/**/*.zip
out/make/**/*.exe
out/make/**/*.AppImage
out/make/**/*.yml
- name: Create Nightly Release
uses: softprops/action-gh-release@v2
with:
name: Nightly ${{ env.NIGHTLY_VERSION }}
draft: false
prerelease: true
tag_name: nightly-${{ env.NIGHTLY_VERSION }}
files: |
out/make/**/*.dmg
out/make/**/*.zip
out/make/**/*.exe
out/make/**/*.AppImage
out/make/**/*.yml
body: |
This is an automated nightly release for testing purposes.
Version: 0.0.0-nightly.${{ env.NIGHTLY_VERSION }}
**Warning:** This build may be unstable and is not recommended for production use.
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 13 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CHANGELOG

## [0.0.1-alpha.15](https://github.com/RSSNext/follow/compare/v0.0.1-alpha.3...v0.0.1-alpha.15) (2024-09-22)
## [0.0.1-alpha.16](https://github.com/RSSNext/follow/compare/v0.0.1-alpha.3...v0.0.1-alpha.16) (2024-09-22)


### Bug Fixes
Expand All @@ -25,6 +25,7 @@
* add hover bg color when context menu opened ([6ceb263](https://github.com/RSSNext/follow/commit/6ceb263b777ccc9681cd086a28e019ce9bda3a43))
* add language selector loading lock map ([2d14c1e](https://github.com/RSSNext/follow/commit/2d14c1e5b5ad086b3556dd9a8862a6ce00368c4d))
* add link ([d9168c0](https://github.com/RSSNext/follow/commit/d9168c01b3f2a16fbfeadb722173e819dd3feb80))
* add lock when login button click ([539f3bc](https://github.com/RSSNext/follow/commit/539f3bc599f4df9784662ca2bf972a94edf556c4))
* add nonce id for temp feed ([8f81d99](https://github.com/RSSNext/follow/commit/8f81d99f1dd48e60f9861d69c840c77fa70bde93))
* add page error boundary ([86d366d](https://github.com/RSSNext/follow/commit/86d366db76add0ad07eb921290b9444b211e2c4f))
* add show readability tip condition ([208e404](https://github.com/RSSNext/follow/commit/208e4040cea5d3485acf5750e7120fb5f715e30f))
Expand Down Expand Up @@ -54,6 +55,7 @@
* button transition ([f731d1e](https://github.com/RSSNext/follow/commit/f731d1e34e151828b6fa9553361f476da9d7e39b))
* calc toc scroller range when entry content changed ([66035fe](https://github.com/RSSNext/follow/commit/66035fea72e3ce0c6fbcd8380fbdef612e052cb4))
* can use under window blur ([9b2656e](https://github.com/RSSNext/follow/commit/9b2656ec53f3865378b7f2392d59a6828b31149c))
* catch access stylesheet error ([bbc2bef](https://github.com/RSSNext/follow/commit/bbc2bef800c5b01669742bb004e2656c9087f82f))
* category in route should encodeURLComponent ([d5b79cb](https://github.com/RSSNext/follow/commit/d5b79cba8a5d6d8fe18efee5d58da5610fc3ce68))
* check undefined view ([71712f4](https://github.com/RSSNext/follow/commit/71712f464d2ab3043b602d4d2c311e4cc851e046))
* ci and tootip portal ([3729917](https://github.com/RSSNext/follow/commit/37299173c8fcaf88d44b1a54baf7ddc03aa20ca6))
Expand Down Expand Up @@ -100,6 +102,7 @@
* electron window type ([909d692](https://github.com/RSSNext/follow/commit/909d6929da5bd3930a6e1d8aa3342c46d00e5c7d))
* empty default font on electron app ([#481](https://github.com/RSSNext/follow/issues/481)) ([4f9d4f2](https://github.com/RSSNext/follow/commit/4f9d4f26f22ac86cce64bb9f1582c2be2b3361c3))
* empty entry list will throw not found feed error, fixed [#224](https://github.com/RSSNext/follow/issues/224) ([c41756d](https://github.com/RSSNext/follow/commit/c41756d2b91173a753e09f5de988b71a27daa9ba))
* empty title break ([fbbb2a9](https://github.com/RSSNext/follow/commit/fbbb2a98b204ff17d80f1826134b713854a0f40d))
* ensure unique keys for search items ([#500](https://github.com/RSSNext/follow/issues/500)) ([6c6b082](https://github.com/RSSNext/follow/commit/6c6b0828b83ff62d95c56417dcb0ebc1faed9535))
* entries hasNext ([4cb5678](https://github.com/RSSNext/follow/commit/4cb56784acfb46516a4320f0088c294eafb32fcf))
* entry bar action ([ba23dcf](https://github.com/RSSNext/follow/commit/ba23dcf46ff7569562d0a786ab85d46093b8abe8))
Expand Down Expand Up @@ -279,6 +282,7 @@
* style ([#359](https://github.com/RSSNext/follow/issues/359)) ([3d39308](https://github.com/RSSNext/follow/commit/3d393086966826f194ae660b43bcb0cb33b3d6f3))
* style center ([a5e3311](https://github.com/RSSNext/follow/commit/a5e33112ff2782cdbca316ff1d4dd6fd78116a1c))
* **style:** button align center and ([38a5cb6](https://github.com/RSSNext/follow/commit/38a5cb682dc0c3082664a2192686ad16f68ecec3))
* **styles:** add gap for received button ([f1b86b3](https://github.com/RSSNext/follow/commit/f1b86b3068eaebee1d123a7c1b5cedb4b4ebef4f))
* **style:** video play button align center ([465f1a6](https://github.com/RSSNext/follow/commit/465f1a6acf6a1d96a28e724f071f8a68a327a56d))
* subcription status & category empty, input value null ([#263](https://github.com/RSSNext/follow/issues/263)) ([93e2ccf](https://github.com/RSSNext/follow/commit/93e2ccfd5831f8a7f43932acd2976785e3adfbff))
* subview layout ([36a34de](https://github.com/RSSNext/follow/commit/36a34de26caf2ff00847827635eedd3771faadc0))
Expand Down Expand Up @@ -333,6 +337,7 @@
* upload sentry sourcemap ([b23365f](https://github.com/RSSNext/follow/commit/b23365faad9927826140948b642c0caca542f135))
* use feed enabled condition ([9726d43](https://github.com/RSSNext/follow/commit/9726d4396673e2be02c60ce049ed07c5bf978380))
* use official embed player in bilibili video when use web ([#219](https://github.com/RSSNext/follow/issues/219)) ([9177a34](https://github.com/RSSNext/follow/commit/9177a349e087cdc60b22e2338146caaefd377694))
* user avatar use profile data if userId passed, fixed [#550](https://github.com/RSSNext/follow/issues/550) ([176afa7](https://github.com/RSSNext/follow/commit/176afa72ba1e0801ac383982f826cc19b215b242))
* user button color in dark mode ([04e3c38](https://github.com/RSSNext/follow/commit/04e3c386c5699e6b0907de2a98701668fc7f278b))
* user modal list padding ([992ea15](https://github.com/RSSNext/follow/commit/992ea1594af02e3815adae2fe99de4f205543239))
* user profile can not scroll by scrollbar ([eac1965](https://github.com/RSSNext/follow/commit/eac1965cfc3d2bc86e11f256237322f15892b897))
Expand Down Expand Up @@ -389,6 +394,7 @@
* ai daily in article content column ([a625d04](https://github.com/RSSNext/follow/commit/a625d04328ea209ead68ce0391a7108cbb2c4e6a))
* ai daily modal ([67d9559](https://github.com/RSSNext/follow/commit/67d9559229baca34aa3328ba711d0e29def5bb8e))
* apm ([602f50a](https://github.com/RSSNext/follow/commit/602f50aa1a2b1ad9559ae22c92c599907df0b8cc))
* **app:** clear all data ([be7e87c](https://github.com/RSSNext/follow/commit/be7e87c192d3c863b3df2439287054682c69a221))
* **audio-view:** seek circle indicator ([94b9535](https://github.com/RSSNext/follow/commit/94b9535d28292dbc209e251e3b0cb18d480d6a3b))
* auto claim daily `POWER`, and update table style ([ca381ce](https://github.com/RSSNext/follow/commit/ca381cebf81cc745e56fe35811004d89b55609ba))
* auto enable readability if no content ([27ecfc4](https://github.com/RSSNext/follow/commit/27ecfc4a86f3e35f245c1bca2d1dba57ff7364f2))
Expand Down Expand Up @@ -456,6 +462,7 @@
* improve shiki code block renderer and show language ([590d9cb](https://github.com/RSSNext/follow/commit/590d9cbb94a63f843d00bf54848bba40157d2452))
* integration settings page ([f9f1938](https://github.com/RSSNext/follow/commit/f9f19386b28e853eb03b3ca5bae629d4f6542cb3))
* invitation limitation message ([fa37a0c](https://github.com/RSSNext/follow/commit/fa37a0ca2c8235fb5fd47f96c26de7fdcd762ad8))
* **invitation:** add signout button ([3c0f4e7](https://github.com/RSSNext/follow/commit/3c0f4e779c68a933d57e232d62774fca1c0b86ed))
* invitations page ([0fc1110](https://github.com/RSSNext/follow/commit/0fc1110e3b1e067a02a65ba7afe5b1456bb76815))
* invitations page tips ([18de381](https://github.com/RSSNext/follow/commit/18de381343d58f19a36fa6e681711fe06c07b1c1))
* invitations tips and confirm modal ([c919e59](https://github.com/RSSNext/follow/commit/c919e5907bae4303b667d6cff39c19ebbf6a4dc6))
Expand Down Expand Up @@ -563,6 +570,11 @@
* speed up user profile modal data loading ([53a5bae](https://github.com/RSSNext/follow/commit/53a5bae316b406ff5c250c3e7772ce4071891bee))


### Reverts

* Revert "refactor: migrate to webp" ([e7081cf](https://github.com/RSSNext/follow/commit/e7081cf48592bfcc24308df19a372a80dc324632))



## [0.0.1-alpha.1](https://github.com/RSSNext/follow/compare/v0.0.1-internal.1...v0.0.1-alpha.1) (2024-07-30)

Expand Down
1 change: 1 addition & 0 deletions apps/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
},
"main": "./src/index.ts",
"scripts": {
"build": "tsup",
"typecheck": "tsup && tsc --noEmit"
},
"dependencies": {
Expand Down
46 changes: 46 additions & 0 deletions apps/main/src/lib/cleaner.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { callGlobalContextMethod } from "@follow/shared/bridge"
import { dialog } from "electron"

import { getMainWindow } from "~/window"

import { t } from "./i18n"

export const clearAllData = async () => {
const win = getMainWindow()
if (!win) return
const ses = win.webContents.session

// Dialog to confirm
const result = await dialog.showMessageBox({
type: "warning",

message: t("dialog.clearAllData"),
buttons: [t("dialog.yes"), t("dialog.no")],
})

if (result.response === 1) {
return
}
try {
await ses.clearCache()

await ses.clearStorageData({
storages: [
"websql",
"filesystem",
"indexdb",
"localstorage",
"shadercache",
"websql",
"serviceworkers",
"cookies",
],
})
callGlobalContextMethod(win, "toast.success", ["App data reset successfully"])

// reload the app
win.reload()
} catch (error: any) {
callGlobalContextMethod(win, "toast.error", [`Error resetting app data: ${error.message}`])
}
}
5 changes: 5 additions & 0 deletions apps/main/src/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import type { BrowserWindow, MenuItem, MenuItemConstructorOptions } from "electr
import { Menu } from "electron"

import { isDev, isMacOS } from "./env"
import { clearAllData } from "./lib/cleaner"
import { t } from "./lib/i18n"
import { revealLogFile } from "./logger"
import { checkForUpdates, quitAndInstall } from "./updater"
Expand Down Expand Up @@ -35,6 +36,10 @@ export const registerAppMenu = () => {
{ role: "hide", label: t("menu.hide", { name }) },
{ role: "hideOthers", label: t("menu.hideOthers") },
{ type: "separator" },
{
label: t("menu.clearAllData"),
click: clearAllData,
},
{ role: "quit", label: t("menu.quit", { name }) },
],
},
Expand Down
3 changes: 3 additions & 0 deletions apps/main/src/tipc/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import type { BrowserWindow } from "electron"
import { app, clipboard, dialog, screen } from "electron"

import { registerMenuAndContextMenu } from "~/init"
import { clearAllData } from "~/lib/cleaner"

import { isWindows11 } from "../env"
import { downloadFile } from "../lib/download"
Expand Down Expand Up @@ -218,6 +219,8 @@ export const appRoute = {

app.commandLine.appendSwitch("lang", input)
}),

clearAllData: t.procedure.action(clearAllData),
}

interface Sender extends Electron.WebContents {
Expand Down
15 changes: 9 additions & 6 deletions apps/renderer/src/components/common/ShadowDOM.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,16 @@ function getLinkedStaticStyleSheets() {
const hasCache = cacheCssTextMap[sheet.href]
if (!hasCache) {
if (!sheet.href) continue
const rules = sheet.cssRules || sheet.rules
let cssText = ""
for (const rule of rules) {
cssText += rule.cssText
try {
const rules = sheet.cssRules || sheet.rules
let cssText = ""
for (const rule of rules) {
cssText += rule.cssText
}
cacheCssTextMap[sheet.href] = cssText
} catch (err) {
console.error("Failed to get cssText for", sheet.href, err)
}

cacheCssTextMap[sheet.href] = cssText
}

cssArray.push({
Expand Down
7 changes: 4 additions & 3 deletions apps/renderer/src/components/user-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ export function UserAvatar({
return <LoginButton {...props} />
}

const renderUserData = userId ? profile.data : session?.user
return (
<div
className={cn(
Expand All @@ -202,11 +203,11 @@ export function UserAvatar({
>
<AvatarImage
className="duration-200 animate-in fade-in-0"
src={(profile.data || session?.user)?.image || undefined}
src={renderUserData?.image || undefined}
/>
<AvatarFallback>{(profile.data || session?.user)?.name?.slice(0, 2)}</AvatarFallback>
<AvatarFallback>{renderUserData?.name?.slice(0, 2)}</AvatarFallback>
</Avatar>
{!hideName && <div>{(profile.data || session?.user)?.name}</div>}
{!hideName && <div>{renderUserData?.name}</div>}
</div>
)
}
Expand Down
2 changes: 1 addition & 1 deletion apps/renderer/src/lib/img-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const getImageProxyUrl = ({
url: string
width: number
height: number
}) => `${env.VITE_IMGPROXY_URL}?url=${encodeURIComponent(url)}&width=${width}&height=${height}`
}) => `${env.VITE_IMGPROXY_URL}/unsafe/fit-in/${width}x${height}/${encodeURIComponent(url)}`

export const replaceImgUrlIfNeed = (url: string) => {
for (const rule of imageRefererMatches) {
Expand Down
2 changes: 1 addition & 1 deletion apps/renderer/src/modules/achievement/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export const AchievementModalContent: FC = () => {
className={styledButtonVariant({
variant: "outline",
className:
"relative !bg-green-100/50 border-green-200 text-green-800 dark:text-foreground dark:!bg-green-100/5 dark:border-green-200/20",
"relative !bg-green-100/50 gap-1 border-green-200 text-green-800 dark:text-foreground dark:!bg-green-100/5 dark:border-green-200/20",
})}
>
<i className="i-mgc-check-filled" />
Expand Down
Loading

0 comments on commit 103c2bf

Please sign in to comment.