diff options
author | Jakob Borg <jakob@kastelo.net> | 2023-05-01 09:30:16 +0200 |
---|---|---|
committer | Jakob Borg <jakob@kastelo.net> | 2023-05-01 09:42:44 +0200 |
commit | 7226b8456b2b8d5749df40a169effcb5b7f8af71 (patch) | |
tree | d29f7486349047cd3add31673d35cd8112befc46 /.github | |
parent | dae5eab78789d29f6054d18357c51092bc000042 (diff) | |
download | syncthing-7226b8456b2b8d5749df40a169effcb5b7f8af71.tar.gz syncthing-7226b8456b2b8d5749df40a169effcb5b7f8af71.zip |
build: Produce nightly release builds
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build-syncthing.yaml | 45 | ||||
-rw-r--r-- | .github/workflows/trigger-nightly.yaml | 21 |
2 files changed, 66 insertions, 0 deletions
diff --git a/.github/workflows/build-syncthing.yaml b/.github/workflows/build-syncthing.yaml index ba2f55e57..966e23cd5 100644 --- a/.github/workflows/build-syncthing.yaml +++ b/.github/workflows/build-syncthing.yaml @@ -459,6 +459,7 @@ jobs: with: name: packages-signed path: packages/* + # # Debian # @@ -505,3 +506,47 @@ jobs: with: name: debian-packages path: "*.deb" + + # + # Nightlies + # + + publish-nightly: + name: Publish nightly build + if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release-nightly') + environment: signing + needs: + - sign-for-upgrade + - notarize-macos + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + repository: syncthing/release-tools + path: tools + fetch-depth: 0 + + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: packages-signed + path: packages + + - name: Create release json + run: | + cd packages + "$GITHUB_WORKSPACE/tools/generate-release-json" "$BASE_URL" > nightly.json + env: + BASE_URL: https://syncthing.ams3.digitaloceanspaces.com/nightly/ + + - name: Push artifacts + 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/nightly diff --git a/.github/workflows/trigger-nightly.yaml b/.github/workflows/trigger-nightly.yaml new file mode 100644 index 000000000..e50a9188c --- /dev/null +++ b/.github/workflows/trigger-nightly.yaml @@ -0,0 +1,21 @@ +name: Trigger nightly build & release +on: + workflow_dispatch: + schedule: + # Run nightly build at 01:00 UTC + - cron: '00 01 * * *' + +jobs: + + trigger-nightly: + runs-on: ubuntu-latest + name: Push to release-nightly to trigger build + steps: + + - uses: actions/checkout@v3 + with: + token: ${{ secrets.ACTIONS_GITHUB_TOKEN }} + fetch-depth: 0 + + - run: | + git push origin main:release-nightly |