Skip to content

添加direct Input接口 #43

添加direct Input接口

添加direct Input接口 #43

name: go-build-release
on:
workflow_dispatch:
push:
tags:
- 'v*' # 匹配 v 开头的标签,如 v1.0.0
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/setup-node@v3.8.0
- name: install
run: cd go-touch-mapper-gh-pages && yarn install
- name: build
run: cd go-touch-mapper-gh-pages && yarn build || true
- 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 rclone -y
- 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 -X main.go_build_version=$(git describe --tags --abbrev=0)" -o go-touch-mapper_amd64
- name: Build arm64
run: CGO_ENABLE=0 GOOS=linux GOARCH=arm64 go build -ldflags="-s -w -X main.go_build_version=$(git describe --tags --abbrev=0)" -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
- name: upload to mirror
run: |
curl -T "go-touch-mapper_amd64" -u "${{ secrets.WEBDAV_USERNAME }}:${{ secrets.WEBDAV_PASSWORD }}" "${{ secrets.WEBDAV_ENDPOINT }}/build/go-touch-mapper_amd64"
curl -T "go-touch-mapper_arm64" -u "${{ secrets.WEBDAV_USERNAME }}:${{ secrets.WEBDAV_PASSWORD }}" "${{ secrets.WEBDAV_ENDPOINT }}/build/go-touch-mapper_arm64"