Skip to content

Commit 0c66ec6

Browse files
committed
2 parents 480a8f6 + 4ab291e commit 0c66ec6

File tree

8 files changed

+346
-27
lines changed

8 files changed

+346
-27
lines changed

.forgejo/workflows/source-release.yaml

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,7 @@ jobs:
6464
echo "RELEASE=$(cat release)" >> $FORGEJO_OUTPUT
6565
echo "BUILD_JOB_ID=$FORGEJO_RUN_NUMBER" >> $FORGEJO_OUTPUT
6666
67-
- name: Prepare release directory
68-
run: |
69-
mkdir -p release-assets
70-
cp librewolf-*.source.tar.gz* release-assets/
71-
ls -lsa release-assets
72-
73-
- name: Upload Release
67+
- name: Upload to Package Registry
7468
run: |
7569
FILES=(
7670
"librewolf-${{ steps.version.outputs.VERSION }}-${{ steps.version.outputs.RELEASE }}.source.tar.gz"
@@ -87,14 +81,42 @@ jobs:
8781
done
8882
8983
- name: Create Release
90-
uses: actions/forgejo-release@v2.7.3
91-
with:
92-
direction: upload
93-
url: ${{ forgejo.server_url }}
94-
repo: ${{ forgejo.repository }}
95-
token: ${{ secrets.FORGE_TOKEN }}
96-
release-dir: release-assets
97-
draft: false
98-
prerelease: false
99-
tag: ${{ steps.version.outputs.VERSION }}-${{ steps.version.outputs.RELEASE }}
100-
release-notes: "## LibreWolf Source Release v${{ steps.version.outputs.VERSION }}-${{ steps.version.outputs.RELEASE }}\n\n(Built on Codeberg by workflow [${{ forgejo.run_number }}](https://codeberg.org/${{ forgejo.repository }}/actions/runs/${{ forgejo.run_number }}))"
84+
run: |
85+
TAG="${{ steps.version.outputs.VERSION }}-${{ steps.version.outputs.RELEASE }}"
86+
PACKAGE_BASE="${{ forgejo.server_url }}/api/packages/${{ forgejo.repository_owner }}/generic/librewolf-source/${TAG}"
87+
88+
# Create release
89+
body=$(jq -n \
90+
--arg tag "$TAG" \
91+
--arg name "LibreWolf Source v${TAG}" \
92+
--arg body $'## LibreWolf Source Release v'"${TAG}"$'\n\nBuilt on Codeberg by workflow [#${{ forgejo.run_number }}](${{ forgejo.server_url }}/${{ forgejo.repository }}/actions/runs/${{ forgejo.run_number }})' \
93+
'{tag_name: $tag, name: $name, body: $body, draft: false, prerelease: false}')
94+
95+
release_id=$(curl --fail-with-body --header 'Content-Type: application/json' \
96+
--header 'accept: application/json' \
97+
--header "Authorization: token ${{ secrets.FORGE_TOKEN }}" \
98+
--data "$body" \
99+
--request POST \
100+
"${{ forgejo.server_url }}/api/v1/repos/${{ forgejo.repository }}/releases" | jq -r '.id')
101+
102+
echo "Release created with ID: $release_id"
103+
104+
# Add external URL assets
105+
FILES=(
106+
"librewolf-${TAG}.source.tar.gz"
107+
"librewolf-${TAG}.source.tar.gz.sha256sum"
108+
"librewolf-${TAG}.source.tar.gz.sha512sum"
109+
)
110+
111+
if [[ -n "${{ secrets.SIGNING_KEY }}" ]]; then
112+
FILES+=("librewolf-${TAG}.source.tar.gz.sig")
113+
fi
114+
115+
for FILE in "${FILES[@]}"; do
116+
echo "Adding external asset: $FILE"
117+
curl --fail-with-body --header 'accept: application/json' \
118+
--header "Authorization: token ${{ secrets.FORGE_TOKEN }}" \
119+
-F "external_url=${PACKAGE_BASE}/${FILE}" \
120+
--request POST \
121+
"${{ forgejo.server_url }}/api/v1/repos/${{ forgejo.repository }}/releases/${release_id}/assets?name=$(printf '%s' "$FILE" | jq -sRr @uri)"
122+
done

.forgejo/workflows/source-test.yaml

Lines changed: 84 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: Create Test Builds
33
on:
44
push:
55
branches:
6-
- '**'
6+
- main
7+
- beta
78
workflow_dispatch:
89
inputs:
910
Target:
@@ -16,13 +17,66 @@ on:
1617
- linux
1718
- windows
1819
- macos
20+
Version:
21+
description: 'Firefox Version'
22+
required: true
23+
default: 'stable'
24+
type: choice
25+
options:
26+
- latest
27+
- beta
28+
- rc
29+
- stable
1930
pull_request_target:
2031
types:
2132
- opened
2233
- synchronize
2334

2435
jobs:
36+
detect-version:
37+
runs-on: epsilon
38+
container:
39+
image: codeberg.org/librewolf/bsys6:dind
40+
outputs:
41+
ff_version: ${{ steps.detect.outputs.FF_VERSION }}
42+
ff_channel: ${{ steps.detect.outputs.FF_CHANNEL }}
43+
ff_build: ${{ steps.detect.outputs.FF_BUILD }}
44+
ff_beta_suffix: ${{ steps.detect.outputs.FF_BETA_SUFFIX }}
45+
ff_display: ${{ steps.detect.outputs.FF_DISPLAY }}
46+
steps:
47+
- name: Checkout Repository
48+
uses: actions/checkout@v4
49+
with:
50+
persist-credentials: false
51+
52+
- name: Install Dependencies
53+
run: |
54+
apt-get update
55+
apt-get -y install curl jq
56+
57+
- name: Detect Firefox Version
58+
id: detect
59+
run: |
60+
chmod +x ./scripts/detect-firefox-version.sh
61+
./scripts/detect-firefox-version.sh --channel "${{ (github.ref == 'refs/heads/beta' || github.base_ref == 'beta') && 'latest' || inputs.Version || 'stable' }}" >> $FORGEJO_OUTPUT
62+
63+
# Read outputs
64+
while IFS='=' read -r key value; do
65+
export "$key=$value"
66+
done < $FORGEJO_OUTPUT
67+
68+
echo "========================================"
69+
echo "Firefox Version:"
70+
echo "========================================"
71+
echo "Version: $FF_VERSION"
72+
echo "Channel: $FF_CHANNEL"
73+
echo "Build: $FF_BUILD"
74+
echo "Beta Suffix: $FF_BETA_SUFFIX"
75+
echo "Display: $FF_DISPLAY"
76+
echo "========================================"
77+
2578
test-linux:
79+
needs: detect-version
2680
if: inputs.Target == 'all' || inputs.Target == 'linux' || inputs.Target == ''
2781
runs-on: epsilon
2882
container:
@@ -32,15 +86,23 @@ jobs:
3286
uses: actions/checkout@v4
3387
with:
3488
submodules: recursive
89+
persist-credentials: false
3590

3691
- name: Install Dependencies
3792
run: |
3893
apt-get update && apt-get -y upgrade
3994
apt-get -y install build-essential curl jq make python3 python3-dev python3-pip wget unzip git pigz gnupg
4095
96+
- name: Setup Version
97+
run: |
98+
echo "Testing against: ${{ needs.detect-version.outputs.ff_display }}"
99+
echo "${{ needs.detect-version.outputs.ff_version }}" > version
100+
41101
- name: Fetching Firefox Source
42102
run: |
43-
make fetch
103+
make fetch FF_CHANNEL=${{ needs.detect-version.outputs.ff_channel }} \
104+
FF_BUILD=${{ needs.detect-version.outputs.ff_build || 'build1' }} \
105+
FF_BETA_SUFFIX=${{ needs.detect-version.outputs.ff_beta_suffix }}
44106
45107
- name: Check Patchfail
46108
run: |
@@ -60,6 +122,7 @@ jobs:
60122
retention-days: ${{ github.event_name == 'push' && 3 || 14 }}
61123

62124
test-windows:
125+
needs: detect-version
63126
if: inputs.Target == 'all' || inputs.Target == 'windows'
64127
runs-on: epsilon
65128
container:
@@ -69,15 +132,23 @@ jobs:
69132
uses: actions/checkout@v4
70133
with:
71134
submodules: recursive
135+
persist-credentials: false
72136

73137
- name: Install Dependencies
74138
run: |
75139
apt-get update && apt-get -y upgrade
76140
apt-get -y install build-essential curl jq make python3 python3-dev python3-pip wget unzip git pigz gnupg
77141
142+
- name: Setup Version
143+
run: |
144+
echo "Testing against: ${{ needs.detect-version.outputs.ff_display }}"
145+
echo "${{ needs.detect-version.outputs.ff_version }}" > version
146+
78147
- name: Fetching Firefox Source
79148
run: |
80-
make fetch
149+
make fetch FF_CHANNEL=${{ needs.detect-version.outputs.ff_channel }} \
150+
FF_BUILD=${{ needs.detect-version.outputs.ff_build || 'build1' }} \
151+
FF_BETA_SUFFIX=${{ needs.detect-version.outputs.ff_beta_suffix }}
81152
82153
- name: Check Patchfail
83154
run: |
@@ -97,6 +168,7 @@ jobs:
97168
retention-days: ${{ github.event_name == 'push' && 3 || 14 }}
98169

99170
test-macos:
171+
needs: detect-version
100172
if: inputs.Target == 'all' || inputs.Target == 'macos'
101173
runs-on: epsilon
102174
container:
@@ -106,15 +178,23 @@ jobs:
106178
uses: actions/checkout@v4
107179
with:
108180
submodules: recursive
181+
persist-credentials: false
109182

110183
- name: Install Dependencies
111184
run: |
112185
apt-get update && apt-get -y upgrade
113186
apt-get -y install build-essential curl jq make python3 python3-dev python3-pip wget unzip git pigz gnupg
114187
188+
- name: Setup Version
189+
run: |
190+
echo "Testing against: ${{ needs.detect-version.outputs.ff_display }}"
191+
echo "${{ needs.detect-version.outputs.ff_version }}" > version
192+
115193
- name: Fetching Firefox Source
116194
run: |
117-
make fetch
195+
make fetch FF_CHANNEL=${{ needs.detect-version.outputs.ff_channel }} \
196+
FF_BUILD=${{ needs.detect-version.outputs.ff_build || 'build1' }} \
197+
FF_BETA_SUFFIX=${{ needs.detect-version.outputs.ff_beta_suffix }}
118198
119199
- name: Check Patchfail
120200
run: |

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,7 @@ $(lw_source_tarball) : $(lw_source_dir)
161161
sha512sum $(lw_source_tarball) > $(lw_source_tarball).sha512sum
162162
cat $(lw_source_tarball).sha512sum
163163
sha512sum -c $(lw_source_tarball).sha512sum
164-
printf '%s\n' "$${SIGNING_KEY}" > pk.asc ; true
165-
if [ -f pk.asc ]; then gpg --import pk.asc; gpg --detach-sign $(lw_source_tarball) && ls -lh $(lw_source_tarball).sig; fi
164+
if [ -n "$${SIGNING_KEY}" ]; then printf '%s\n' "$${SIGNING_KEY}" | gpg --import && gpg --detach-sign $(lw_source_tarball) && ls -lh $(lw_source_tarball).sig; fi
166165
ls -lh $(lw_source_tarball)*
167166

168167

assets/uBOAssets.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,23 @@
460460
],
461461
"supportURL": "https://github.com/easylist/easylist#fanboy-lists"
462462
},
463+
"fanboy-ai-suggestions": {
464+
"content": "filters",
465+
"group": "annoyances",
466+
"parent": "EasyList – Annoyances",
467+
"off": true,
468+
"title": "EasyList – AI Suggestions",
469+
"tags": "annoyances",
470+
"preferred": true,
471+
"contentURL": "https://ublockorigin.github.io/uAssets/thirdparties/easylist-ai.txt",
472+
"cdnURLs": [
473+
"https://ublockorigin.github.io/uAssetsCDN/thirdparties/easylist-ai.txt",
474+
"https://ublockorigin.pages.dev/thirdparties/easylist-ai.txt",
475+
"https://cdn.jsdelivr.net/gh/uBlockOrigin/uAssetsCDN@main/thirdparties/easylist-ai.txt",
476+
"https://cdn.statically.io/gh/uBlockOrigin/uAssetsCDN/main/thirdparties/easylist-ai.txt"
477+
],
478+
"supportURL": "https://github.com/easylist/easylist#fanboy-lists"
479+
},
463480
"easylist-newsletters": {
464481
"content": "filters",
465482
"group": "annoyances",

release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1
1+
3

0 commit comments

Comments
 (0)