Skip to content

Commit

Permalink
ci(release): use BackBlaze B2 for binaries storage instead of Github
Browse files Browse the repository at this point in the history
  • Loading branch information
gotson committed Nov 30, 2023
1 parent f41af61 commit f704685
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 13 deletions.
42 changes: 30 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,11 @@ jobs:
mkdir ./secret
echo $APPLE_PRIVATE_KEY | base64 --decode > ./secret/apple_private_key.p8
- name: Conveyor build apps
- name: Conveyor make site
uses: hydraulic-software/conveyor/actions/[email protected]
if: inputs.github_release
with:
command: -f conveyor.ci.conf make site -o ./output/release
command: -f conveyor.ci.conf make site -o ./output/site
signing_key: ${{ secrets.CONVEYOR_SIGNING_KEY }}
agree_to_license: 1
env:
Expand All @@ -187,20 +187,38 @@ jobs:
name: conveyor-make-site
path: ~/.cache/hydraulic/conveyor/logs/log.latest.txt

- name: Adjust Conveyor output
- name: Conveyor make old-site
uses: hydraulic-software/conveyor/actions/[email protected]
if: inputs.github_release
with:
command: -f conveyor.ci.conf make old-site -o ./output/old-site
signing_key: ${{ secrets.CONVEYOR_SIGNING_KEY }}
agree_to_license: 1
env:
APPLE_ISSUER_ID: ${{ secrets.APPLE_ISSUER_ID }}
APPLE_KEY_ID: ${{ secrets.APPLE_KEY_ID }}
- name: Upload Conveyor log
if: always() && inputs.github_release
uses: actions/upload-artifact@v3
with:
name: conveyor-make-old-site
path: ~/.cache/hydraulic/conveyor/logs/log.latest.txt

- name: Adjust Conveyor old-site output
if: inputs.github_release
run: |
mkdir ./output/site
mv ./output/release/download.html ./output/site/index.html
mv ./output/release/icon.svg ./output/site/
rm ./output/old-site/download.html
rm ./output/old-site/icon.svg
- name: Deploy download page to Github Pages
- name: Upload Conveyor site to B2
if: inputs.github_release
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./output/site
cname: download.komga.org
uses: jakejarvis/s3-sync-action@master
env:
AWS_S3_BUCKET: ${{ secrets.B2_BUCKET }}
AWS_S3_ENDPOINT: 'https://s3.us-east-005.backblazeb2.com'
AWS_ACCESS_KEY_ID: ${{ secrets.B2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.B2_SECRET_ACCESS_KEY }}
SOURCE_DIR: 'output/site'

- name: JReleaser Release
if: inputs.github_release
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ jreleaser {
files {
active = Active.RELEASE
// workaround as glob doesn't seem to work https://github.com/jreleaser/jreleaser/issues/1466
file("./output/release").listFiles()?.forEach {
file("./output/old-site").listFiles()?.forEach {
artifact {
path = it
}
Expand Down
5 changes: 5 additions & 0 deletions conveyor.conf
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ app {
aarch64.inputs += ./komga-tray/lib/mac/aarch64/
amd64.inputs += ./komga-tray/lib/mac/x64/
}

site {
base-url = "https://download.komga.org"
move-from.base-url = "https://github.com/gotson/komga/releases/latest/download"
}
}

conveyor.compatibility-level = 11

0 comments on commit f704685

Please sign in to comment.