name: Build and Release auth-rt on: push: tags: - 'v*' jobs: build: runs-on: docker strategy: matrix: include: - goos: darwin goarch: arm64 - goos: darwin goarch: amd64 - goos: linux goarch: amd64 - goos: linux goarch: arm64 steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version: '1.22' - name: Build env: GOOS: ${{ matrix.goos }} GOARCH: ${{ matrix.goarch }} run: | cd cli go build -ldflags="-s -w" -o ../auth-rt-${{ matrix.goos }}-${{ matrix.goarch }} . - name: Upload artifact uses: actions/upload-artifact@v4 with: name: auth-rt-${{ matrix.goos }}-${{ matrix.goarch }} path: auth-rt-${{ matrix.goos }}-${{ matrix.goarch }} release: needs: build runs-on: docker steps: - uses: actions/download-artifact@v4 with: merge-multiple: true - name: Create release uses: softprops/action-gh-release@v2 with: files: auth-rt-* generate_release_notes: true - name: Update latest tag run: | # Also upload to "latest" release for install.sh --download for f in auth-rt-*; do echo "Uploading $f to latest release..." done