diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2a59528ca..a9d71153a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,8 +3,15 @@ name: Release on: workflow_dispatch jobs: + version: + runs-on: ubuntu-latest + steps: + - run: echo "::set-output version=$(sh .github/workflows/version.sh)" + build-featurebase: runs-on: ubuntu-latest + needs: + - version strategy: matrix: goos: @@ -22,38 +29,38 @@ jobs: go-version: "^1.19.1" - name: build featurebase - run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} make release-build + run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o ./build/featurebase-${{ matrix.goos }}-${{ matrix.goarch }} ./cmd/featurebase - # - uses: actions/upload-artifact@v3 - # with: - # name: featurebase-${{ matrix.goos }}-${{ matrix.goarch }} - # path: ./build/featurebase-${{ matrix.goos }}-${{ matrix.goarch }} - - build-ingest: - runs-on: ubuntu-latest - strategy: - matrix: - goos: - - "darwin" - - "linux" - goarch: - - "amd64" - - "arm64" - - steps: - - uses: actions/checkout@v3 - - - uses: actions/setup-go@v3 + - uses: actions/upload-artifact@v3 with: - go-version: "^1.19.1" + name: featurebase-${{ matrix.goos }}-${{ matrix.goarch }} + path: ./build/featurebase-${{ matrix.goos }}-${{ matrix.goarch }} - - name: navigate to ingest - run: cd idk + # build-ingest: + # runs-on: ubuntu-latest + # strategy: + # matrix: + # goos: + # - "darwin" + # - "linux" + # goarch: + # - "amd64" + # - "arm64" + + # steps: + # - uses: actions/checkout@v3 - - name: build ingest - run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} make release-build + # - uses: actions/setup-go@v3 + # with: + # go-version: "^1.19.1" + + # - name: navigate to ingest + # run: cd idk + + # - name: build ingest + # run: GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o ./build/ingest-${{ matrix.goos }}-${{ matrix.goarch }} /cmd/ingester - # - uses: actions/upload-artifact@v3 - # with: - # name: ingest-${{ matrix.goos }}-${{ matrix.goarch }} - # path: ./build/ingest-${{ matrix.goos }}-${{ matrix.goarch }} + # - uses: actions/upload-artifact@v3 + # with: + # name: ingest-${{ matrix.goos }}-${{ matrix.goarch }} + # path: ./build/ingest-${{ matrix.goos }}-${{ matrix.goarch }} diff --git a/.github/workflows/version.sh b/.github/workflows/version.sh new file mode 100644 index 000000000..9587cd67e --- /dev/null +++ b/.github/workflows/version.sh @@ -0,0 +1,5 @@ +#!/bin/sh +current=$(git describe --tags | grep -Eo '[0-9]*?\.[0-9]*?\.[0-9]*') +array=($(echo $current | tr '.' '\n')) +array[2]=$((array[2]+1)) +echo $(IFS="." ; echo "${array[*]}") \ No newline at end of file