mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
104 lines
3.6 KiB
YAML
104 lines
3.6 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'release-build'
|
|
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: |
|
|
pwd
|
|
go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/featurebase/featurebase -ldflags "${{needs.meta.outputs.ldflags}}" ./cmd/featurebase
|
|
go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/idk/consumer-csv -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-csv
|
|
go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/idk/consumer-kafka-static -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-kafka-static
|
|
go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/idk/consumer-sql -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-sql
|
|
go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/idk/consumer-github -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-github
|
|
go build -o ./build/${{ matrix.goos }}-${{ matrix.goarch }}/idk/consumer-kinesis -ldflags "${{needs.meta.outputs.ldflags}}" ./idk/cmd/molecula-consumer-kinesis
|
|
cp ./install/featurebase.conf NOTICE ./install/featurebase.debian.service ./install/featurebase.redhat.service ./build/${{ matrix.goos }}-${{ matrix.goarch }}/featurebase/
|
|
cd ./build/${{ matrix.goos }}-${{ matrix.goarch }}/
|
|
tar -cvf /home/runner/work/featurebase/featurebase/featurebase-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz *
|
|
ls -al
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: featurebase-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
|
|
path: /home/runner/work/featurebase/featurebase/featurebase-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz
|
|
|