Skip to content

Commit

Permalink
Add appcast.xml generation action (#202)
Browse files Browse the repository at this point in the history
This adds an action to generate the appcast.xml and push it to cloud
storage bucket. This replaces the thing currently running on
build.syncthing.net, which is in a slow death spiral.

I set the action to run nightly and manually; since it's based on the
published releases it should be fine to run periodically (generating
identical contents each time) and manually in case a quick update is
required.

(Also refreshed the dependencies for the generation script while I was
in there.)
  • Loading branch information
calmh authored Oct 4, 2023
1 parent b7e7c2b commit d57d979
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 355 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/generate-appcast.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Generate appcast.xml

on:
workflow_dispatch:
schedule:
- cron: '42 3 * * *'

jobs:
generate-appcast:
name: Generate appcast.xml
runs-on: ubuntu-latest
environment: appcast
steps:
- uses: actions/checkout@v3

- name: Generate appcast.xml
run: |
cd cmd/ghreleases2appcast
go run . -o ../../appcast.xml
- name: Push to Spaces
uses: docker://docker.io/rclone/rclone:latest
env:
RCLONE_CONFIG_SPACES_TYPE: s3
RCLONE_CONFIG_SPACES_PROVIDER: DigitalOcean
RCLONE_CONFIG_SPACES_ACCESS_KEY_ID: ${{ secrets.SPACES_KEY }}
RCLONE_CONFIG_SPACES_SECRET_ACCESS_KEY: ${{ secrets.SPACES_SECRET }}
RCLONE_CONFIG_SPACES_ENDPOINT: ams3.digitaloceanspaces.com
RCLONE_CONFIG_SPACES_ACL: public-read
with:
args: copy appcast.xml spaces:syncthing-macos/appcast/
14 changes: 10 additions & 4 deletions cmd/ghreleases2appcast/go.mod
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
module github.com/syncthing/syncthing-macos/cmd/ghreleases2appcast

go 1.15
go 1.21

require (
github.com/google/go-github v17.0.0+incompatible
github.com/google/go-querystring v1.0.0 // indirect
github.com/hashicorp/go-version v1.2.1
github.com/hashicorp/go-version v1.6.0
github.com/russross/blackfriday/v2 v2.1.0
golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602
golang.org/x/oauth2 v0.12.0
)

require (
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/go-querystring v1.1.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.31.0 // indirect
)
Loading

0 comments on commit d57d979

Please sign in to comment.