-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
38 additions
and
102 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |
This file was deleted.
Oops, something went wrong.