mirror of
https://github.com/Picocrypt/Picocrypt.git
synced 2025-05-12 21:58:31 +02:00
75 lines
1.6 KiB
YAML
75 lines
1.6 KiB
YAML
name: build-linux
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
on:
|
|
schedule:
|
|
- cron: "0 0 * * *"
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: '>1.18'
|
|
check-latest: true
|
|
cache: false
|
|
|
|
- name: Install packages
|
|
run: |
|
|
sudo apt install -y gcc xorg-dev libgtk-3-dev libgl1-mesa-dev libglu1-mesa wget
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
cd src
|
|
go mod download
|
|
|
|
- name: Build
|
|
run: |
|
|
cd src
|
|
go build -v -ldflags="-s -w" -o Picocrypt Picocrypt.go
|
|
env:
|
|
CGO_ENABLED: 1
|
|
GOAMD64: v2
|
|
|
|
- name: Package as .deb
|
|
run: |
|
|
wget https://github.com/user-attachments/files/15934717/Picocrypt.zip
|
|
python -m zipfile -e Picocrypt.zip Picocrypt
|
|
cp src/Picocrypt Picocrypt/Picocrypt/usr/bin/picocrypt-gui
|
|
cd Picocrypt
|
|
dpkg-deb -Zxz --build --root-owner-group Picocrypt
|
|
|
|
- name: Prepare to upload artifacts
|
|
run: |
|
|
mkdir out
|
|
mv src/Picocrypt out
|
|
mv Picocrypt/Picocrypt.deb out
|
|
rm -rf src
|
|
rm -rf Picocrypt
|
|
mv out/Picocrypt .
|
|
mv out/Picocrypt.deb .
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-linux
|
|
path: |
|
|
Picocrypt
|
|
Picocrypt.deb
|
|
if-no-files-found: error
|
|
compression-level: 9
|
|
|
|
- name: Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: |
|
|
Picocrypt
|
|
Picocrypt.deb
|
|
tag_name: nightly
|
|
make_latest: true
|