|
@@ -173,7 +173,7 @@ jobs:
|
|
|
|
|
|
codesign-windows:
|
|
codesign-windows:
|
|
name: Codesign for Windows
|
|
name: Codesign for Windows
|
|
- if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/tags/v'))
|
|
|
|
|
|
+ if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/release-nightly' || startsWith(github.ref, 'refs/tags/v'))
|
|
environment: release
|
|
environment: release
|
|
runs-on: windows-latest
|
|
runs-on: windows-latest
|
|
needs:
|
|
needs:
|
|
@@ -280,7 +280,7 @@ jobs:
|
|
|
|
|
|
package-macos:
|
|
package-macos:
|
|
name: Package for macOS
|
|
name: Package for macOS
|
|
- if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/tags/v'))
|
|
|
|
|
|
+ if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/release-nightly' || startsWith(github.ref, 'refs/tags/v'))
|
|
environment: release
|
|
environment: release
|
|
runs-on: macos-latest
|
|
runs-on: macos-latest
|
|
steps:
|
|
steps:
|
|
@@ -380,7 +380,7 @@ jobs:
|
|
|
|
|
|
notarize-macos:
|
|
notarize-macos:
|
|
name: Notarize for macOS
|
|
name: Notarize for macOS
|
|
- if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/tags/v'))
|
|
|
|
|
|
+ if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/release-nightly' || startsWith(github.ref, 'refs/tags/v'))
|
|
environment: release
|
|
environment: release
|
|
needs:
|
|
needs:
|
|
- package-macos
|
|
- package-macos
|
|
@@ -524,7 +524,7 @@ jobs:
|
|
|
|
|
|
sign-for-upgrade:
|
|
sign-for-upgrade:
|
|
name: Sign for upgrade
|
|
name: Sign for upgrade
|
|
- if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/tags/v'))
|
|
|
|
|
|
+ if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/release-nightly' || startsWith(github.ref, 'refs/tags/v'))
|
|
environment: release
|
|
environment: release
|
|
needs:
|
|
needs:
|
|
- codesign-windows
|
|
- codesign-windows
|
|
@@ -723,6 +723,8 @@ jobs:
|
|
name: Publish release files
|
|
name: Publish release files
|
|
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/tags/v'))
|
|
if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/tags/v'))
|
|
environment: release
|
|
environment: release
|
|
|
|
+ permissions:
|
|
|
|
+ contents: write
|
|
needs:
|
|
needs:
|
|
- sign-for-upgrade
|
|
- sign-for-upgrade
|
|
- package-debian
|
|
- package-debian
|
|
@@ -782,13 +784,35 @@ jobs:
|
|
with:
|
|
with:
|
|
args: sync -v objstore:release/${{ env.VERSION }} objstore:release/latest
|
|
args: sync -v objstore:release/${{ env.VERSION }} objstore:release/latest
|
|
|
|
|
|
|
|
+ - name: Create GitHub release and push binaries
|
|
|
|
+ run: |
|
|
|
|
+ maybePrerelease=""
|
|
|
|
+ if [[ $VERSION == *-* ]]; then
|
|
|
|
+ maybePrerelease="--prerelease"
|
|
|
|
+ fi
|
|
|
|
+ export GH_PROMPT_DISABLED=1
|
|
|
|
+ if ! gh release view --json name "$VERSION" >/dev/null 2>&1 ; then
|
|
|
|
+ gh release create \
|
|
|
|
+ "$VERSION" \
|
|
|
|
+ $maybePrerelease \
|
|
|
|
+ --title "$VERSION" \
|
|
|
|
+ --notes-from-tag
|
|
|
|
+ fi
|
|
|
|
+ gh release upload "$VERSION" \
|
|
|
|
+ packages/*.asc packages/*.json \
|
|
|
|
+ packages/syncthing-*.tar.gz \
|
|
|
|
+ packages/syncthing-*.zip \
|
|
|
|
+ packages/syncthing*.deb
|
|
|
|
+ env:
|
|
|
|
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
+
|
|
#
|
|
#
|
|
# Push Debian/APT archive
|
|
# Push Debian/APT archive
|
|
#
|
|
#
|
|
|
|
|
|
publish-apt:
|
|
publish-apt:
|
|
name: Publish APT
|
|
name: Publish APT
|
|
- if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/tags/v'))
|
|
|
|
|
|
+ if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/release-nightly' || startsWith(github.ref, 'refs/tags/v'))
|
|
environment: release
|
|
environment: release
|
|
needs:
|
|
needs:
|
|
- package-debian
|
|
- package-debian
|
|
@@ -867,7 +891,7 @@ jobs:
|
|
docker-syncthing:
|
|
docker-syncthing:
|
|
name: Build and push Docker images
|
|
name: Build and push Docker images
|
|
runs-on: ubuntu-latest
|
|
runs-on: ubuntu-latest
|
|
- if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release' || github.ref == 'refs/heads/infrastructure' || startsWith(github.ref, 'refs/heads/release-') || startsWith(github.ref, 'refs/tags/v'))
|
|
|
|
|
|
+ if: (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release-nightly' || github.ref == 'refs/heads/infrastructure' || startsWith(github.ref, 'refs/tags/v'))
|
|
environment: docker
|
|
environment: docker
|
|
permissions:
|
|
permissions:
|
|
contents: read
|
|
contents: read
|