Merge pull request #24 from seerai/cleanup/add-search-commit #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test and Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
container: golang:1-alpine | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install GDAL Dev libs | |
run: | | |
apk add --no-cache \ | |
git \ | |
openssh \ | |
libspatialite \ | |
gdal-dev \ | |
blosc \ | |
blosc-dev \ | |
g++ | |
- name: Run Tests | |
run: | | |
go test -short ./... -coverprofile=coverage.out -covermode=atomic | |
- name: Upload Coverage | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
files: ./coverage.out | |
release: | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Increment Semver | |
id: semver | |
uses: paulhatch/semantic-version@v4.0.3 | |
with: | |
tag_prefix: "v" | |
major_pattern: "(MAJOR)" | |
minor_pattern: "(MINOR)" | |
search_commit_body: true | |
format: "${major}.${minor}.${patch}" | |
short_tags: false | |
- name: Create tag | |
id: tag | |
run: | | |
git config user.name github-actions | |
git config user.email gcp-headless@seerai.space | |
git tag ${{ steps.semver.outputs.version_tag }} -m "Beep, Boop. Written by a robot. Beep, Boop." | |
git push --tags |