name: Release on: push: tags: '*' env: GOTOOLCHAIN: local jobs: build-windows: name: Build Windows Assets environment: production runs-on: windows-latest strategy: matrix: go: ['1.27.x'] steps: - uses: actions/checkout@v7 with: fetch-depth: 0 persist-credentials: false ref: ${{ github.ref }} # We specify the current ref because otherwise the checkout turns # annotated tags into lightweight ones, breaking "git describe". # See https://github.com/actions/checkout/issues/290 and # https://github.com/actions/checkout/issues/882 for details. - run: gem install asciidoctor - uses: actions/setup-go@v7 with: go-version: ${{ matrix.go }} - run: mkdir -p "$HOME/go/bin" shell: bash - run: set GOPATH=%HOME%\go - run: choco install -y InnoSetup - run: choco install -y zip - run: choco install -y jq - run: GOPATH="$HOME/go" PATH="$HOME/go/bin:$PATH" go install github.com/josephspurrier/goversioninfo/cmd/goversioninfo@latest shell: bash - uses: git-for-windows/setup-git-for-windows-sdk@v2 with: flavor: minimal # We install the SDK so as to have access to the msgfmt.exe binary # from the GNU gettext package. - run: mkdir -p bin/releases shell: bash - run: PATH="$HOME/go/bin:$PATH" GOARCH=amd64 go generate && make bin/releases/git-lfs-windows-amd64-$(git describe).zip shell: bash env: FORCE_LOCALIZE: true - run: PATH="$HOME/go/bin:$PATH" GOARCH=386 go generate && make bin/releases/git-lfs-windows-386-$(git describe).zip shell: bash env: FORCE_LOCALIZE: true - run: PATH="$HOME/go/bin:$PATH" GOARCH=arm64 go generate && make bin/releases/git-lfs-windows-arm64-$(git describe).zip shell: bash env: FORCE_LOCALIZE: true - run: make release-windows-stage-1 shell: bash env: FORCE_LOCALIZE: true - uses: azure/artifact-signing-action@v2.0.0 with: azure-tenant-id: ${{ secrets.SPN_GIT_LFS_SIGNING_TENANT_ID }} azure-client-id: ${{ secrets.SPN_GIT_LFS_SIGNING_CLIENT_ID }} azure-client-secret: ${{ secrets.SPN_GIT_LFS_SIGNING }} # Note that the endpoint URI must match the Azure region where our # Signing Account and Certificate Profile were created: # https://github.com/Azure/artifact-signing-action/blob/v1.1.0/README.md?plain=1#L138-L139 endpoint: https://wus3.codesigning.azure.net/ signing-account-name: GitHubInc certificate-profile-name: GitHubInc files-folder: ${{ github.workspace }}/tmp/stage1 files-folder-filter: exe file-digest: SHA256 timestamp-rfc3161: http://timestamp.acs.microsoft.com timestamp-digest: SHA256 - run: make release-windows-stage-2 shell: bash - uses: azure/artifact-signing-action@v2.0.0 with: azure-tenant-id: ${{ secrets.SPN_GIT_LFS_SIGNING_TENANT_ID }} azure-client-id: ${{ secrets.SPN_GIT_LFS_SIGNING_CLIENT_ID }} azure-client-secret: ${{ secrets.SPN_GIT_LFS_SIGNING }} # Note that the endpoint URI must match the Azure region where our # Signing Account and Certificate Profile were created: # https://github.com/Azure/artifact-signing-action/blob/v1.1.0/README.md?plain=1#L138-L139 endpoint: https://wus3.codesigning.azure.net/ signing-account-name: GitHubInc certificate-profile-name: GitHubInc files-folder: ${{ github.workspace }}/tmp/stage2 files-folder-filter: exe file-digest: SHA256 timestamp-rfc3161: http://timestamp.acs.microsoft.com timestamp-digest: SHA256 - run: make release-windows-stage-3 shell: bash - run: make release-windows-rebuild shell: bash - uses: actions/upload-artifact@v7 with: name: windows-assets path: bin/releases build-macos: name: Build macOS Assets environment: production runs-on: macos-latest strategy: matrix: go: ['1.27.x'] steps: - uses: actions/checkout@v7 with: fetch-depth: 0 persist-credentials: false ref: ${{ github.ref }} - run: gem install asciidoctor - uses: actions/setup-go@v7 with: go-version: ${{ matrix.go }} - run: make release env: FORCE_LOCALIZE: true - run: CERT_FILE="$HOME/cert.p12" make release-write-certificate env: CERT_CONTENTS: ${{secrets.GATEWATCHER_DEVELOPER_ID_CERT}} - run: CERT_FILE="$HOME/cert.p12" make release-import-certificate env: CERT_PASS: ${{secrets.GATEWATCHER_DEVELOPER_ID_PASSWORD}} - run: make release-darwin env: DARWIN_DEV_USER: ${{secrets.MACOS_DEV_USER}} DARWIN_DEV_PASS: ${{secrets.MACOS_DEV_PASS}} DARWIN_DEV_TEAM: ${{secrets.MACOS_DEV_TEAM}} - uses: actions/upload-artifact@v7 with: name: macos-assets path: bin/releases build-main: name: Main Release Assets needs: - build-windows - build-macos runs-on: ubuntu-latest strategy: matrix: go: ['1.27.x'] steps: - uses: actions/checkout@v7 with: fetch-depth: 0 persist-credentials: false ref: ${{ github.ref }} - run: sudo gem install asciidoctor - uses: actions/setup-go@v7 with: go-version: ${{ matrix.go }} - run: sudo apt-get update && sudo apt-get -y install gettext libarchive-tools env: DEBIAN_FRONTEND: noninteractive - uses: actions/download-artifact@v8 with: name: windows-assets path: windows-assets - uses: actions/download-artifact@v8 with: name: macos-assets path: macos-assets - run: CGO_ENABLED=0 make release - run: rm -f bin/releases/*windows* bin/releases/*darwin* - run: 'find windows-assets -name "*windows*" -type f | xargs -I{} mv {} bin/releases' - run: 'find macos-assets -name "*darwin*" -type f | xargs -I{} mv {} bin/releases' - run: rm -f bin/releases/git-lfs-windows-assets*.tar.gz - run: mkdir -p release-assets/bin - run: mv bin/releases release-assets/bin - uses: actions/upload-artifact@v7 with: name: release-assets path: release-assets build-docker: name: Build Linux Packages environment: production runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 with: fetch-depth: 0 persist-credentials: false ref: ${{ github.ref }} - run: sudo gem install packagecloud-ruby - run: git clone https://github.com/git-lfs/build-dockers.git "$HOME/build-dockers" - run: (cd "$HOME/build-dockers" && ./build_dockers.bsh) - run: ./docker/run_dockers.bsh --prune # If this is a pre-release tag, don't upload anything to packagecloud. - run: '[ -z "${GITHUB_REF%%refs/tags/*-pre*}" ] || ./script/packagecloud.rb' env: PACKAGECLOUD_TOKEN: ${{secrets.PACKAGECLOUD_TOKEN}} build-docker-arm: name: Build Linux ARM packages runs-on: ubuntu-24.04-arm steps: - uses: actions/checkout@v7 with: fetch-depth: 0 persist-credentials: false ref: ${{ github.ref }} - run: sudo gem install packagecloud-ruby - run: git clone https://github.com/git-lfs/build-dockers.git "$HOME/build-dockers" - run: (cd "$HOME/build-dockers" && ./build_dockers.bsh --arch=arm64 debian_11 debian_12 debian_13) - run: ./docker/run_dockers.bsh --prune --arch=arm64 debian_11 debian_12 debian_13 # If this is a pre-release tag, don't upload anything to packagecloud. - run: '[ -z "${GITHUB_REF%%refs/tags/*-pre*}" ] || ./script/packagecloud.rb' env: PACKAGECLOUD_TOKEN: ${{secrets.PACKAGECLOUD_TOKEN}}