Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 20 additions & 0 deletions .github/actions/setup-project/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ inputs:
description: 'If true, sets up Node.js and installs Yarn dependencies'
required: false
default: 'false'
setup-system-deps:
description: 'If true, installs system dependencies for GNOME/Flatpak builds'
required: false
default: 'false'
meson-version:
description: 'Meson version to install via pip (optional)'
required: false
default: ''

runs:
using: 'composite'
Expand All @@ -22,6 +30,18 @@ runs:
node-version: '24'
cache: 'yarn'

- name: Install system dependencies
if: inputs.setup-system-deps == 'true'
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y ninja-build gjs python3-pip desktop-file-utils appstream libglib2.0-dev libgjs0g gettext

- name: Install Meson
if: inputs.meson-version != ''
shell: bash
run: pip3 install --break-system-packages "meson==${{ inputs.meson-version }}"

- name: Install dependencies
if: inputs.setup-node == 'true'
shell: bash
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: '[build] flatpak validation'
name: '[build] bundle validation'

on:
workflow_call:
Expand All @@ -9,6 +9,8 @@ on:
paths-ignore:
- 'po/**'
push:
tags:
- 'v*'
branches:
- main
paths-ignore:
Expand All @@ -18,39 +20,6 @@ permissions:
contents: read

jobs:
i18n-update:
name: '[build] update translations'
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event_name != 'workflow_call'
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 1

- name: Install system dependencies
run: sudo apt-get update && sudo apt-get install -y meson ninja-build gjs

- name: Setup Project
uses: ./.github/actions/setup-project
with:
setup-node: 'true'

- name: Update POT files
run: yarn pot-generator

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403
with:
commit_message: 'lang: update pot files'
file_pattern: 'po/*.po po/*.pot'

- name: Clean up credentials
if: always()
run: |
rm -rf ~/.gnupg ~/.gnupg/private-keys-v1.d || true
find ~/.gnupg -delete 2>/dev/null || true

bundle-prod:
name: '[build] validate prod bundle'
runs-on: ubuntu-latest
Expand All @@ -67,7 +36,7 @@ jobs:
fetch-depth: 1

- name: Setup Project
uses: ./.github/actions/setup-project
uses: andrepg/do-it/.github/actions/setup-project

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specifying action "andrepg/do-it/.github/actions/setup-project" in invalid format because ref is missing. available formats are "{owner}/{repo}@{ref}" or "{owner}/{repo}/{path}@{ref}" [actionlint:action]

with:
setup-node: 'true'

Expand Down Expand Up @@ -100,7 +69,7 @@ jobs:
fetch-depth: 1

- name: Setup Project
uses: ./.github/actions/setup-project
uses: andrepg/do-it/.github/actions/setup-project

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specifying action "andrepg/do-it/.github/actions/setup-project" in invalid format because ref is missing. available formats are "{owner}/{repo}@{ref}" or "{owner}/{repo}/{path}@{ref}" [actionlint:action]

with:
setup-node: 'true'

Expand All @@ -116,8 +85,3 @@ jobs:
run: |
rm -rf ~/.gnupg ~/.gnupg/private-keys-v1.d || true
find ~/.gnupg -delete 2>/dev/null || true

test-and-coverage:
name: '[build] test and coverage'
if: github.event_name != 'workflow_call'
uses: ./.github/workflows/test-coverage.yml
47 changes: 43 additions & 4 deletions .github/workflows/flatpak-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:

jobs:
flatpak-validation:
uses: ./.github/workflows/flatpak-bundle-validation.yml
uses: ./.github/workflows/bundle-validation.yml

flatpak-bundle:
name: '[build] create flatpak bundle'
Expand All @@ -37,8 +37,15 @@ jobs:
with:
fetch-depth: 1

- name: Checkout flatpak keys
uses: actions/checkout@v6
with:
sparse-checkout: |
flatpak/io.github.andrepg.Doit-latest.pub
Comment thread
qltysh[bot] marked this conversation as resolved.
sparse-checkout-cone-mode: false

- name: Setup Project
uses: ./.github/actions/setup-project
uses: andrepg/do-it/.github/actions/setup-project

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specifying action "andrepg/do-it/.github/actions/setup-project" in invalid format because ref is missing. available formats are "{owner}/{repo}@{ref}" or "{owner}/{repo}/{path}@{ref}" [actionlint:action]


- name: Setup GPG
run: |
Expand Down Expand Up @@ -72,16 +79,48 @@ jobs:

- name: Generate flatpakref
run: |
cat << 'FLATPAKREF' > "${{ env.FLATPAK_NAME }}-latest.flatpakref"
# Import separate public key for distribution (not the signing key)
gpg --batch --yes --import flatpak/io.github.andrepg.Doit-latest.pub

# Filter by email to get specific key fingerprint
DIST_KEY_FP=$(gpg --list-public-keys --with-colons "andrepg@protonmail.com" 2>/dev/null | grep "^fpr" | cut -d: -f10)

# Validate fingerprint was extracted
if [ -z "$DIST_KEY_FP" ]; then
echo "ERROR: No key found for andrepg@protonmail.com"
exit 1
fi

# Export as BINARY (no --armor!), then base64 encode
GPG_PUB_KEY=$(gpg --export "$DIST_KEY_FP" | base64 -w0)

# Validate base64 output is not empty
if [ -z "$GPG_PUB_KEY" ]; then
echo "ERROR: Failed to export or encode GPG key"
exit 1
fi

# Generate flatpakref with base64-encoded key
cat << FLATPAKREF > "${{ env.FLATPAK_NAME }}-latest.flatpakref"
[Flatpak Ref]
Title=Do It
Name=${{ env.FLATPAK_NAME }}
Branch=main
Url=https://github.com/${{ github.repository }}/releases/download/${{ env.RELEASE_TAG }}/${{ env.FLATPAK_NAME }}-latest.flatpak
IsRuntime=False
GPGKey=${{ secrets.FLATPAK_GPG_KEY }}
GPGKey=$GPG_PUB_KEY
FLATPAKREF

- name: Verify flatpakref GPGKey format
run: |
# Use robust grep without anchor for INI file format
GPG_KEY_VAL=$(grep "GPGKey=" "${{ env.FLATPAK_NAME }}-latest.flatpakref" | cut -d= -f2)
if ! echo "$GPG_KEY_VAL" | base64 -d >/dev/null 2>&1; then
echo "ERROR: GPGKey is not valid base64"
exit 1
fi
echo "Verified: GPGKey is valid base64"

- name: Upload bundle to release
uses: softprops/action-gh-release@v2
with:
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/i18n-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: '[build] i18n update'

on:
pull_request:
branches: ['main']
paths:
- 'src/**'
- 'package.json'
- 'yarn.lock'

permissions:
contents: write

jobs:
i18n-update:
name: '[build] update translations'
runs-on: ubuntu-latest
steps:
- name: Setup Project
uses: andrepg/do-it/.github/actions/setup-project

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specifying action "andrepg/do-it/.github/actions/setup-project" in invalid format because ref is missing. available formats are "{owner}/{repo}@{ref}" or "{owner}/{repo}/{path}@{ref}" [actionlint:action]

with:
setup-node: 'true'
setup-system-deps: 'true'
meson-version: '1.4.0'

- name: Update POT files
run: yarn pot-generator

- name: Create new branch for translations
run: |
git checkout -b "i18n-update/$(git rev-parse --short HEAD)"

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@b863ae1933cb653a53c021fe36dbb774e1fb9403
with:
commit_message: 'lang: update pot files'
file_pattern: 'po/*.po po/*.pot'

- name: Create PR
if: github.event_name == 'pull_request'
run: |
BRANCH_NAME="i18n-update/$(git rev-parse --short HEAD)"
git push -u origin "$BRANCH_NAME"
gh pr create --base "$GITHUB_REF_NAME" --head "$BRANCH_NAME" \
--title "lang: update pot files" \
--body "Automated POT file update from i18n-update workflow"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: '[ci] pr checks'
name: '[ci] quality checks'

on:
pull_request:
Expand All @@ -12,11 +12,8 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup Project
uses: ./.github/actions/setup-project
uses: andrepg/do-it/.github/actions/setup-project
with:
setup-node: 'true'

Expand All @@ -28,11 +25,8 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup Project
uses: ./.github/actions/setup-project
uses: andrepg/do-it/.github/actions/setup-project
with:
setup-node: 'true'

Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@ jobs:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup Project
uses: ./.github/actions/setup-project
uses: andrepg/do-it/.github/actions/setup-project

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specifying action "andrepg/do-it/.github/actions/setup-project" in invalid format because ref is missing. available formats are "{owner}/{repo}@{ref}" or "{owner}/{repo}/{path}@{ref}" [actionlint:action]

with:
setup-node: 'true'

Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
repo/

**/_build
**/build
**/_build-*/**
**/_repo-*/**
**/*.json~
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ _build_pot
flatpak/generated-sources.json
package-lock.json
**.code-workspace
build
2 changes: 1 addition & 1 deletion .qlty/qlty.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ exclude_patterns = [
"**/.flatpak-builder/**",
"flatpak/generated-sources.json",
".github/workflows/version-bump.yml",
".github/workflows/pr-checks.yml",
".github/workflows/quality-checks.yml",
]

test_patterns = [
Expand Down
5 changes: 2 additions & 3 deletions commitlint.static.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const AllowedPrefixes = [
* @see https://commitlint.js.org/reference/configuration#rules
*/
export enum RuleConfigExecution {
always = 'always'
always = 'always',
}

/**
Expand All @@ -38,6 +38,5 @@ export enum RuleConfigExecution {
*/
export enum RuleConfigName {
typeEnum = 'type-enum',
headerCase = 'header-case'
headerCase = 'header-case',
}

1 change: 1 addition & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export default defineConfig([
'.github/**',

'.vscode/**',
'.opencode/**',

'flatpak/**',
'tests/**',
Expand Down
2 changes: 1 addition & 1 deletion po/POTFILES.in
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ src/app.wrapper.ts
src/app.entrypoint.ts

# Core files
src/core/persistence/gio-persistence.ts
src/core/interfaces/task-view.ts
src/core/interfaces/settings.ts
src/core/interfaces/persistence.ts
Expand All @@ -33,6 +32,7 @@ src/platform/gnome/actions/toast.ts
src/platform/gnome/actions/quit.ts
src/platform/gnome/actions/backup.ts
src/platform/gnome/actions/about.ts
src/platform/gnome/persistence/gio-persistence.ts

# Platform/GNOME - Views
src/platform/gnome/views/doit.ts
Expand Down
2 changes: 1 addition & 1 deletion po/es.po
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: io.github.andrepg.Doit\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-12 08:48-0300\n"
"POT-Creation-Date: 2026-04-13 13:22-0300\n"
"PO-Revision-Date: 2026-04-07 21:05-0300\n"
"Last-Translator: André Paul Grandsire <andrepg@users.noreply.github.com>\n"
"Language-Team: Spanish\n"
Expand Down
2 changes: 1 addition & 1 deletion po/io.github.andrepg.Doit.pot
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: io.github.andrepg.Doit\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-12 08:48-0300\n"
"POT-Creation-Date: 2026-04-13 13:22-0300\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
Expand Down
6 changes: 5 additions & 1 deletion po/meson.build
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
i18n.gettext(
app_id,
args: '--directory=' + meson.project_source_root() / 'po',
preset: 'glib',
args: [
'--keyword=C_:1c,2',
'--flag=C_:2:pass-c-format',
'--directory=' + meson.project_source_root() / 'po',
],
install_dir: 'share/locale'
)

Expand Down
2 changes: 1 addition & 1 deletion po/pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ msgid ""
msgstr ""
"Project-Id-Version: io.github.andrepg.Doit\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-04-12 08:48-0300\n"
"POT-Creation-Date: 2026-04-13 13:22-0300\n"
"PO-Revision-Date: 2026-04-07 21:15-0300\n"
"Last-Translator: André Paul Grandsire <andre@users.noreply.github.com>\n"
"Language-Team: Portuguese <andre@users.noreply.github.com>\n"
Expand Down
Loading