2024-10-11 11:45:26 +07:00
|
|
|
name: build
|
|
|
|
|
|
|
|
run-name: ${{ gitea.actor }} build MouseSoft Draw.IO Export
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- "**"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: check-out repository code
|
|
|
|
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"
|
|
|
|
|
2024-10-12 15:06:01 +07:00
|
|
|
- name: set-up dependencies
|
|
|
|
run: make clean vendor
|
2024-10-11 11:45:26 +07:00
|
|
|
|
2024-10-12 15:06:01 +07:00
|
|
|
- name: test
|
|
|
|
run: make lint test
|
2024-10-11 11:45:26 +07:00
|
|
|
|
|
|
|
- name: build amd64 binary
|
2024-10-12 15:06:01 +07:00
|
|
|
id: build-amd
|
|
|
|
run: |
|
|
|
|
echo "ARTIFACT=drawio-export-$(make version)_$(go env GOOS)-amd64" >> $GITHUB_OUTPUT
|
|
|
|
GOARCH=amd64 make clean build
|
2024-10-11 11:45:26 +07:00
|
|
|
|
2024-10-11 11:48:41 +07:00
|
|
|
- name: upload amd64 binary artifact
|
2024-10-11 11:45:26 +07:00
|
|
|
uses: https://gitea.com/actions/upload-artifact@v3
|
|
|
|
with:
|
2024-10-12 15:06:01 +07:00
|
|
|
name: ${{ steps.build-amd.outputs.ARTIFACT }}
|
2024-10-11 11:55:16 +07:00
|
|
|
path: out/bin/*
|
2024-10-11 11:45:26 +07:00
|
|
|
overwrite: true
|
|
|
|
|
|
|
|
- name: build arm64 binary
|
2024-10-12 15:06:01 +07:00
|
|
|
id: build-arm
|
|
|
|
run: |
|
|
|
|
echo "ARTIFACT=drawio-export-$(make version)_$(go env GOOS)-arm64" >> $GITHUB_OUTPUT
|
|
|
|
GOARCH=arm64 make clean build
|
2024-10-11 11:45:26 +07:00
|
|
|
|
2024-10-11 11:48:41 +07:00
|
|
|
- name: upload arm64 binary artifact
|
2024-10-11 11:45:26 +07:00
|
|
|
uses: https://gitea.com/actions/upload-artifact@v3
|
|
|
|
with:
|
2024-10-12 15:06:01 +07:00
|
|
|
name: ${{ steps.build-arm.outputs.ARTIFACT }}
|
|
|
|
path: out/bin/*
|
|
|
|
overwrite: true
|
|
|
|
|
|
|
|
build_windows:
|
|
|
|
runs-on: windows
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
shell: bash
|
|
|
|
steps:
|
|
|
|
- name: check-out repository code
|
|
|
|
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 artifact
|
|
|
|
uses: https://gitea.com/actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: ${{ steps.build.outputs.ARTIFACT }}
|
2024-10-11 11:55:16 +07:00
|
|
|
path: out/bin/*
|
2024-10-11 11:45:26 +07:00
|
|
|
overwrite: true
|