Skip to content

Fix apt command

Fix apt command #5

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: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install gcc libgl1-mesa-dev xorg-dev gcc-mingw-w64
- name: Linux build
run: go build -v -ldflags "-s -w" -o hasherino-linux
- name: Windows build
run: |
export GOOS=windows
export GOARCH=amd64
export CGO_ENABLED=1
export CC=x86_64-w64-mingw32-gcc
go build -v -ldflags "-s -w" -o hasherino-windows.exe
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: hasherino
path: |
hasherino-linux
hasherino-windows.exe
release:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: 'hasherino'
path: 'artifacts'
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
body_path: CHANGELOG.md
files: |
artifacts/*