Skip to content

气死我了

气死我了 #55

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Release Build
on:
push:
branches: [ "master" ]
tags:
- 'v*.*.*'
pull_request:
branches: [ "master" ]
tags:
- 'v*.*.*'
jobs:
build:
strategy:
matrix:
# Include amd64 on all platforms.
goos: [ windows, linux ]
goarch: [ amd64, 386 ]
goamd64: [ v1 ]
exclude:
# Exclude i386 on darwin and dragonfly.
- goarch: 386
goos: dragonfly
runs-on: ubuntu-latest
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
GOAMD64: ${{ matrix.goamd64 }}
CGO_ENABLED: 0
BUILD_NAME: AutoInstall-${{ matrix.goos }}-${{ matrix.goarch }}-${{ matrix.goamd64 }}${{ matrix.goos == 'windows' && '.exe' || '' }}
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ^1.20
check-latest: true
- name: Build
run: go build -o dist/${{ env.BUILD_NAME }} app.go && ls dist
- name: Get version
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
Publish:
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
draft: true
fail_on_unmatched_files: true