drawio-export/.gitea/workflows/build.yaml
Алексей Бадяев b7fd0dcd05
All checks were successful
build / build_windows (push) Successful in 24s
build / build (push) Successful in 1m11s
Переименованы шаги в workflow.
2024-10-18 01:05:56 +07:00

99 lines
2.5 KiB
YAML

name: build
run-name: ${{ gitea.actor }} build MouseSoft Draw.IO Export
on:
push:
branches:
- "**"
tags-ignore:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: check-out
uses: https://gitea.com/actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: set-up go
uses: https://gitea.com/actions/setup-go@v3
with:
go-version: ">=1.22"
- name: set-up dependencies
run: |
go install github.com/kisielk/errcheck@latest
go install honnef.co/go/tools/cmd/staticcheck@latest
go install github.com/sashamelentyev/usestdlibvars@latest
go install golang.org/x/tools/go/analysis/passes/shadow/cmd/shadow@latest
make vendor
- name: lint
run: make lint
- name: golangci-lint
uses: https://github.com/golangci/golangci-lint-action@v6
with:
version: v1.60
- name: test
run: make test
- name: build amd64
id: build-amd
run: |
echo "ARTIFACT=drawio-export-$(make version)_$(go env GOOS)-amd64" >> $GITHUB_OUTPUT
GOARCH=amd64 make clean build
- name: upload amd64
uses: https://gitea.com/actions/upload-artifact@v3
with:
name: ${{ steps.build-amd.outputs.ARTIFACT }}
path: out/bin/*
overwrite: true
- name: build arm64
id: build-arm
run: |
echo "ARTIFACT=drawio-export-$(make version)_$(go env GOOS)-arm64" >> $GITHUB_OUTPUT
GOARCH=arm64 make clean build
- name: upload arm64
uses: https://gitea.com/actions/upload-artifact@v3
with:
name: ${{ steps.build-arm.outputs.ARTIFACT }}
path: out/bin/*
overwrite: true
build_windows:
runs-on: windows
defaults:
run:
shell: bash
steps:
- name: check-out
uses: https://gitea.com/actions/checkout@v4
with:
fetch-depth: 0
fetch-tags: true
- name: set-up dependencies
run: make vendor
- name: build
id: build
run: |
echo "ARTIFACT=drawio-export-$(make version)_$(go env GOOS)-$(go env GOARCH)" >> $GITHUB_OUTPUT
make build
- name: upload
uses: https://gitea.com/actions/upload-artifact@v3
with:
name: ${{ steps.build.outputs.ARTIFACT }}
path: out/bin/*
overwrite: true