diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b1f32a8e..23da3835 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,30 +1,14 @@ -name: Main +name: Lint & Test on: - workflow_dispatch: pull_request: push: branches: - master + - its-happening + +env: + CGO_ENABLED: 1 jobs: test: - runs-on: ${{ matrix.os }} - permissions: - contents: read - strategy: - matrix: - os: [ ubuntu-latest , macos-latest, windows-latest ] - go-version: [ '1.21', '1.22' ] - steps: - - name: Configure git - run: git config --global core.autocrlf false # required on Windows - - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go-version }} - - name: Test - uses: ./.github/actions/test - - name: Build - env: - CGO_ENABLED: 1 - run: go build -o bin/ ./cmd/hostd + uses: SiaFoundation/workflows/.github/workflows/go-test.yml@master diff --git a/.github/workflows/publish_v2.yml b/.github/workflows/publish_v2.yml index 12f8a78a..104d08a2 100644 --- a/.github/workflows/publish_v2.yml +++ b/.github/workflows/publish_v2.yml @@ -1,18 +1,23 @@ -name: Publish V2 +name: Publish # Controls when the action will run. on: - # Triggers the workflow when its-happening branch is pushed + # Triggers the workflow on new SemVer tags push: branches: - its-happening - workflow_dispatch: + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: false jobs: publish: uses: SiaFoundation/workflows/.github/workflows/go-publish.yml@master secrets: inherit with: - build-args: -trimpath -a -ldflags '-s -w -linkmode external -extldflags "-static"' + linux-build-args: -tags=timetzdata -trimpath -a -ldflags '-s -w -linkmode external -extldflags "-static"' + windows-build-args: -tags=timetzdata -trimpath -a -ldflags '-s -w -linkmode external -extldflags "-static"' + macos-build-args: -tags=timetzdata -trimpath -a -ldflags '-s -w' cgo-enabled: 1 project: hostd