Skip to content
Merged
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
66 changes: 42 additions & 24 deletions .github/workflows/release-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -777,6 +777,44 @@ jobs:
}
EOF

- name: Publish updater feeds to gh-pages
shell: bash
env:
CHANNEL: ${{ needs.prepare.outputs.channel }}
PAGES_DIR: ${{ runner.temp }}/gh-pages
run: |
(
cd "$PAGES_DIR"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add "${CHANNEL}" .nojekyll
if git diff --cached --quiet; then
echo "No updater feed changes to publish."
else
git commit -m "Publish updater feeds for ${{ needs.prepare.outputs.tag }}"
git push origin HEAD:gh-pages
fi
)

- name: Print published feed URLs
shell: bash
run: |
node --input-type=module <<'EOF'
import fs from "node:fs";
import path from "node:path";

const baseUrl = "${{ needs.prepare.outputs.pages_base_url }}".replace(/\/+$/, "");
const channel = "${{ needs.prepare.outputs.channel }}";
const metadataDir = path.resolve(".artifacts/release-targets");

for (const fileName of fs.readdirSync(metadataDir).filter((file) => file.endsWith(".json")).sort()) {
const metadata = JSON.parse(
fs.readFileSync(path.join(metadataDir, fileName), "utf8"),
);
console.log(`${baseUrl}/${channel}/${metadata.feedRelativePath}`);
}
EOF

- name: Install APT repository tools
run: sudo apt-get update && sudo apt-get install -y dpkg gnupg gzip

Expand Down Expand Up @@ -860,40 +898,20 @@ jobs:
apt-get install -y --download-only "neverwrite=$VERSION"
'

- name: Publish pages artifacts to gh-pages
- name: Publish APT repository to gh-pages
shell: bash
env:
CHANNEL: ${{ needs.prepare.outputs.channel }}
PAGES_DIR: ${{ runner.temp }}/gh-pages
run: |
(
cd "$PAGES_DIR"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add "${CHANNEL}" apt .nojekyll
git add apt .nojekyll
if git diff --cached --quiet; then
echo "No pages artifact changes to publish."
echo "No APT repository changes to publish."
else
git commit -m "Publish release pages artifacts for ${{ needs.prepare.outputs.tag }}"
git commit -m "Publish APT repository for ${{ needs.prepare.outputs.tag }}"
git push origin HEAD:gh-pages
fi
)

- name: Print published feed URLs
shell: bash
run: |
node --input-type=module <<'EOF'
import fs from "node:fs";
import path from "node:path";

const baseUrl = "${{ needs.prepare.outputs.pages_base_url }}".replace(/\/+$/, "");
const channel = "${{ needs.prepare.outputs.channel }}";
const metadataDir = path.resolve(".artifacts/release-targets");

for (const fileName of fs.readdirSync(metadataDir).filter((file) => file.endsWith(".json")).sort()) {
const metadata = JSON.parse(
fs.readFileSync(path.join(metadataDir, fileName), "utf8"),
);
console.log(`${baseUrl}/${channel}/${metadata.feedRelativePath}`);
}
EOF
Loading