name: Release on: push: branches: - 'chore/gh2181/release-builds' workflow_dispatch: jobs: meta: runs-on: ubuntu-latest outputs: ldflags: ${{ steps.ldflags.outputs.ldflags }} tag: ${{ steps.tag.outputs.tag }} version: ${{ steps.version.outputs.version }} steps: - uses: actions/checkout@v3 with: fetch-depth: 0 - run: echo $(git describe --tags) - id: version run: echo "version=$(.github/workflows/version.sh)" >> $GITHUB_OUTPUT - id: tag run: echo "tag=v${{ steps.version.outputs.version }}-community" >> $GITHUB_OUTPUT - id: ldflags run: echo "ldflags=-X github.com/featurebasedb/featurebase/v3.Version=${{ steps.tag.outputs.tag }} -X github.com/featurebasedb/featurebase/v3.Commit=${{ github.sha }}" >> $GITHUB_OUTPUT test-meta: runs-on: ubuntu-latest needs: [meta] steps: - run: echo "version ${{needs.meta.outputs.version}}" - run: echo "tag ${{needs.meta.outputs.tag}}" - run: echo "ldflags ${{needs.meta.outputs.ldflags}}" build-lattice: runs-on: ubuntu-latest needs: [meta] env: CI: false steps: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: node-version: 14 - run: | cd lattice yarn install yarn build mv build ../ cd ../ rm -r lattice mv build lattice tar -czvf lattice.tar.gz lattice - uses: actions/upload-artifact@v3 with: name: lattice.tar.gz path: ./lattice.tar.gz build-featurebase: runs-on: ubuntu-latest needs: [meta] strategy: matrix: goos: - "darwin" - "linux" goarch: - "amd64" - "arm64" env: GOOS: ${{ matrix.goos }} GOARCH: ${{ matrix.goarch }} steps: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: go-version: "^1.19.1" - name: build featurebase run: | go build -o ./build/featurebase-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./cmd/featurebase go build -o ./build/roaring-migrate-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./cmd/roaring-migrate - uses: actions/upload-artifact@v3 with: name: featurebase-${{ matrix.goos }}-${{ matrix.goarch }} path: ./build/featurebase-${{ matrix.goos }}-${{ matrix.goarch }} - uses: actions/upload-artifact@v3 with: name: roaring-migrate-${{ matrix.goos }}-${{ matrix.goarch }} path: ./build/roaring-migrate-${{ matrix.goos }}-${{ matrix.goarch }} build-ingest: runs-on: ubuntu-latest needs: [meta] strategy: matrix: goos: - "darwin" - "linux" goarch: - "amd64" - "arm64" env: GOOS: ${{ matrix.goos }} GOARCH: ${{ matrix.goarch }} steps: - uses: actions/checkout@v3 - uses: actions/setup-go@v3 with: go-version: "^1.19.1" - name: build ingester run: go build -o ./build/ingester-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/ingester - name: build consumer-csv run: go build -o ./build/consumer-csv-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-csv - name: build consumer-kafka-static run: go build -o ./build/consumer-kafka-static-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-kafka-static - name: build consumer-sql run: go build -o ./build/consumer-sql-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-sql - name: build consumer-github run: go build -o ./build/consumer-github-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-github - name: build consumer-kinesis run: go build -o ./build/consumer-kinesis-${{ matrix.goos }}-${{ matrix.goarch }} -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-kinesis - uses: actions/upload-artifact@v3 with: name: ingester-${{ matrix.goos }}-${{ matrix.goarch }} path: ./build/ingester-${{ matrix.goos }}-${{ matrix.goarch }} - uses: actions/upload-artifact@v3 with: name: consumers-${{ matrix.goos }}-${{ matrix.goarch }} path: ./build/consumer* bundle: runs-on: ubuntu-latest needs: - meta - build-featurebase - build-lattice - build-ingest strategy: matrix: goos: - "darwin" - "linux" goarch: - "amd64" - "arm64" steps: - uses: actions/download-artifact@v3 with: name: featurebase-${{ matrix.goos }}-${{ matrix.goarch }} path: artifacts/ - uses: actions/download-artifact@v3 with: name: roaring-migrate-${{ matrix.goos }}-${{ matrix.goarch }} path: artifacts/ - uses: actions/download-artifact@v3 with: name: ingester-${{ matrix.goos }}-${{ matrix.goarch }} path: artifacts/ - uses: actions/download-artifact@v3 with: name: consumers-${{ matrix.goos }}-${{ matrix.goarch }} path: artifacts/ - uses: actions/download-artifact@v3 with: name: lattice.tar.gz path: artifacts/ - run: ls -alt artifacts/ - run: tar -cvzf featurebase-${{needs.meta.outputs.version}}.tar.gz artifacts/* - uses: actions/upload-artifact@v3 with: name: featurebase-${{needs.meta.outputs.version}}--${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz path: featurebase-${{needs.meta.outputs.version}}.tar.gz