aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Borg <jakob@kastelo.net>2023-06-06 17:53:05 +0200
committerJakob Borg <jakob@kastelo.net>2023-06-06 17:53:05 +0200
commita972811f54e011c65fc09803b4f69cb1fd210ec9 (patch)
tree14057d65c0eab855adceb6e0c839661abc3e45a4
parent88da67d7c3a69b9b51cbb79a739552fee28dc12e (diff)
downloadsyncthing-a972811f54e011c65fc09803b4f69cb1fd210ec9.tar.gz
syncthing-a972811f54e011c65fc09803b4f69cb1fd210ec9.zip
build: Push release files to cloud storage
-rw-r--r--.github/workflows/build-syncthing.yaml46
1 files changed, 46 insertions, 0 deletions
diff --git a/.github/workflows/build-syncthing.yaml b/.github/workflows/build-syncthing.yaml
index 7669978eb..20b3f83fd 100644
--- a/.github/workflows/build-syncthing.yaml
+++ b/.github/workflows/build-syncthing.yaml
@@ -578,3 +578,49 @@ jobs:
RCLONE_CONFIG_SPACES_ACL: public-read
with:
args: sync packages spaces:syncthing/nightly
+
+ #
+ # Push release artifacts to Spaces
+ #
+
+ publish-release-files:
+ name: Publish release files
+ if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release')
+ environment: signing
+ needs:
+ - sign-for-upgrade
+ - package-debian
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ fetch-depth: 0
+
+ - name: Download signed packages
+ uses: actions/download-artifact@v3
+ with:
+ name: packages-signed
+ path: packages
+
+ - name: Download debian packages
+ uses: actions/download-artifact@v3
+ with:
+ name: debian-packages
+ path: packages
+
+ - name: Set version
+ run: |
+ version=$(go run build.go version)
+ echo "VERSION=$version" >> $GITHUB_ENV
+
+ - 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: sync packages spaces:syncthing/release/${{ env.VERSION }}