Skip to content

build

build #137

Workflow file for this run

name: build
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
schedule:
- cron: "0 2 * * *"
jobs:
build:
name: Build
strategy:
max-parallel: 4
matrix:
os: [ubuntu-latest]
go-version: ["1.22", "1.21"]
runs-on: ${{ matrix.os }}
steps:
- name: setup
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
id: go
- name: checkout
uses: actions/checkout@v4
- name: install dependency
run: go get ./...
- name: unit test
run: go test ./... -v -race -coverprofile=coverage.txt -covermode=atomic
- name: codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: set snapshot version
run: echo "VERSION=$(echo $GITHUB_SHA | cut -c 1-6)" >> $GITHUB_ENV
- name: Get appName
id: appname
uses: notiz-dev/github-action-json-property@release
with:
path: "app.json"
prop_path: "appName"
- name: Get app description
id: app-description
uses: notiz-dev/github-action-json-property@release
with:
path: "app.json"
prop_path: "appDescription"
- name: build
working-directory: main
run: bash build.sh
env:
APPNAME: ${{steps.appname.outputs.prop}}
APPDESCRIPTION: ${{steps.app-description.outputs.prop}}
# - name: upload artifact
# uses: actions/upload-artifact@v4.3.1
# with:
# # Artifact name
# name: SNAPSHOTS-Build
# # Directory containing files to upload
# path: main/build