Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
sshh12 committed Sep 28, 2024
1 parent 5c85bec commit 5153650
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 102 deletions.
73 changes: 38 additions & 35 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,46 @@
name: release
name: Release

on:
push:
tags:
- '*'

jobs:
goreleaser:
runs-on: ubuntu-latest
build-and-release:
name: Build and Release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest]
include:
- os: windows-latest
output_name: screen_complete.exe
- os: macos-latest
output_name: screen_complete

steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '^1.23.1'
-
name: Set up Cross-compile ENV
run: |
sudo apt update
sudo apt install gcc libc6-dev
sudo apt install libx11-dev xorg-dev libxtst-dev libpng++-dev
sudo apt install xcb libxcb-xkb-dev x11-xkb-utils libx11-xcb-dev libxkbcommon-x11-dev
sudo apt install libxkbcommon-dev
sudo apt install xsel xclip
sudo apt-get install gcc-multilib
sudo apt-get install gcc-mingw-w64
sudo apt install libz-mingw-w64-dev
-
name: Install GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
install-only: true
-
name: GoReleaser Release
run: goreleaser
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Set up GCC
uses: egor-tensin/setup-gcc@v1
with:
version: latest
platform: x64

- name: Build
run: |
go build -o ${{ matrix.output_name }} ./cmd/screen_complete
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ matrix.output_name }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
67 changes: 0 additions & 67 deletions .goreleaser.yml

This file was deleted.

0 comments on commit 5153650

Please sign in to comment.