Skip to content

html文件集成到程序中 #12

html文件集成到程序中

html文件集成到程序中 #12

name: Go build
on:
push:
tags:
- 'v*' # 匹配 v 开头的标签,如 v1.0.0
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
- name: install go-bindata
run: sudo apt-get install go-bindata
- name: build assets
run: go-bindata -pkg main -o inputManager.go-bindata.go inputManager.apk
- name: install and pre build
run: go build
- name: Build amd64
run: CGO_ENABLE=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w" -o go-touch-mapper_amd64
- name: Build arm64
run: CGO_ENABLE=0 GOOS=linux GOARCH=arm64 go build -ldflags="-s -w" -o go-touch-mapper_arm64
- name: list files
run: ls -al
- name: test help
run: ./go-touch-mapper -h
- name: Create GitHub release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ github.event.client_payload.tag}}
title: ${{ github.event.client_payload.title}}
prerelease: false
files: |
go-touch-mapper_amd64
go-touch-mapper_arm64