Skip to content

Commit

Permalink
add Build CI
Browse files Browse the repository at this point in the history
  • Loading branch information
marguerite committed Jul 4, 2021
1 parent faba4f3 commit 0143c7b
Show file tree
Hide file tree
Showing 9 changed files with 64 additions and 21 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: ci

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: ubuntu-18.04
steps:
- uses: actions/[email protected]
- name: Update packages
run: |
sudo apt-get update
- name: Install dependencies
run: |
sudo apt-get install golang-1.13 wget fuse libfuse2 kmod
ls -l /lib/modules
/sbin/modprobe fuse
- name: Build AppImage
run: |
export GO111MODULE=on
go mod download
go mod vendor
chmod +x build.sh
bash build.sh
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: rankmirror-ng-x86_64.AppImage
asset_name: rankmirror-ng-v2-$tag.x86_64.AppImage
tag: ${{ github.ref }}
overwrite: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vendor
9 changes: 5 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash

go mod download
go mod vendor
mkdir -p rankmirror-ng.AppDir/usr/bin
go build -o rankmirror-ng.AppDir/usr/bin/rankmirror-ng
cp mirrors.yaml rankmirror-ng.AppDir/usr
wget https://github.com/AppImage/AppImageKit/releases/download/12/appimagetool-x86_64.AppImage
chmod +x appimagetool-x86_64.AppImage
wget https://github.com/AppImage/AppImageKit/releases/download/12/AppRun-x86_64
mv AppRun-x86_64 rankmirror-ng.AppDir/AppRun
cp -r AppRun-x86_64 rankmirror-ng.AppDir/AppRun
chmod +x rankmirror-ng.AppDir/AppRun
cp -r rankmirror-ng.desktop rankmirror-ng.AppDir
cp -r yast-services-manager.svg rankmirror-ng.AppDir
./appimagetool-x86_64.AppImage rankmirror-ng.AppDir
mv rankmirror-ng-x86_64.AppImage rankmirror-ng-v2-1.0.0.x86_64.AppImage
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ module github.com/marguerite/rankmirror-ng
go 1.15

require (
github.com/fatih/color v1.10.0
github.com/marguerite/diagnose v0.0.0-20201108054916-cac4196aae2d
github.com/marguerite/go-stdlib v0.0.0-20210319061925-9cba1a57e232
github.com/fatih/color v1.12.0
github.com/marguerite/diagnose v0.0.0-20210608143816-5198a120fc78
github.com/marguerite/go-stdlib v0.0.0-20210704033045-fb80b42257fa
gopkg.in/yaml.v2 v2.4.0
)
24 changes: 14 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,20 @@ github.com/andybalholm/cascadia v1.2.0/go.mod h1:YCyR8vOZT9aZ1CHEd8ap0gMVm2aFgxB
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/fatih/color v1.10.0 h1:s36xzo75JdqLaaWoiEHk767eHiwo0598uUxyfiPkDsg=
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
github.com/fatih/color v1.12.0 h1:mRhaKNwANqRgUBGKmnI5ZxEk7QXmjQeCcuYFMX2bfcc=
github.com/fatih/color v1.12.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
github.com/gookit/color v1.3.2/go.mod h1:R3ogXq2B9rTbXoSHJ1HyUVAZ3poOJHpd9nQmyGZsfvQ=
github.com/marguerite/diagnose v0.0.0-20201108054916-cac4196aae2d h1:hds0yKB/Ebm4oAOUrWE3lft6loC5LYixkMCflt+PKkQ=
github.com/marguerite/diagnose v0.0.0-20201108054916-cac4196aae2d/go.mod h1:KLA69Jj+D4Lk5NFNZzGkCHdbcM/MUhzmarDOEoelP0c=
github.com/marguerite/diagnose v0.0.0-20210608143816-5198a120fc78 h1:vxQL/wcs+MVCy5IsAiNeHOGjikcTW1G+RBA3ER47gPg=
github.com/marguerite/diagnose v0.0.0-20210608143816-5198a120fc78/go.mod h1:sQCzdLlKClXxkshkQPcw3ZamQ5rxc6KfXuJR2M5Lsmc=
github.com/marguerite/fonts-config-ng v0.0.0-20201023143954-8480d11b8d3b/go.mod h1:qCjSK1swY95Tlc+9F8zq9MjvdPNjRnIJ1wqhAX3OnQI=
github.com/marguerite/go-gnulib v0.0.0-20201129052155-646ebc0367a8 h1:ygl6WQISmoPOMotDhLBNJDdPWeqK6lHecSJCBGJm6UQ=
github.com/marguerite/go-gnulib v0.0.0-20201129052155-646ebc0367a8/go.mod h1:3rYBf8gtXz3mUEDnme0ZEuJihv5SxYDYhhuErSa2R/E=
github.com/marguerite/go-gnulib v0.0.0-20210318090450-407d620c3bb7 h1:r6SvgWeSU24hrSZkgLCJXFTwEczpJIRgHDkXxw3ziGc=
github.com/marguerite/go-gnulib v0.0.0-20210318090450-407d620c3bb7/go.mod h1:3rYBf8gtXz3mUEDnme0ZEuJihv5SxYDYhhuErSa2R/E=
github.com/marguerite/go-stdlib v0.0.0-20201020040347-a38ea842e5f8/go.mod h1:Eh9sXSouLfXNCm7k/5PffYs4qZtBJqRJKlv+boNaqCI=
github.com/marguerite/go-stdlib v0.0.0-20201025071756-d06494888d27/go.mod h1:Eh9sXSouLfXNCm7k/5PffYs4qZtBJqRJKlv+boNaqCI=
github.com/marguerite/go-stdlib v0.0.0-20210319061925-9cba1a57e232 h1:xOPBvXpnFvjmJB3WdZjjRgTrWTEjwgn3G4Wx5WQMQg0=
github.com/marguerite/go-stdlib v0.0.0-20210319061925-9cba1a57e232/go.mod h1:KvE8sUfNYjWoekEiUUJftPxSGF87Ckw71ZvPWxeuK4Y=
github.com/marguerite/util v0.0.0-20201025071756-d06494888d27/go.mod h1:O9sK+ae5egCLsW7GODcULahgSNJ5P3XNSPgccfyr87E=
github.com/marguerite/go-stdlib v0.0.0-20210608110703-464cab94a188/go.mod h1:2ud4GPUBY/eUAQ0dIJtJKGR/4Gw4cOrLuRbLpQK3fxE=
github.com/marguerite/go-stdlib v0.0.0-20210704033045-fb80b42257fa h1:qfW+hNpsvjNGJlMD+c5AVIH90Y4yHiVAxO5rOcRH+QU=
github.com/marguerite/go-stdlib v0.0.0-20210704033045-fb80b42257fa/go.mod h1:64/xfPTOxf8RtcDpfIRBhNlD/uZL3kfjpalogviNus8=
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
Expand All @@ -44,11 +45,14 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c h1:VwygUrnw9jn88c4u8GD3rZQbqrP/tgas88tPUbBxQrk=
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE=
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
Expand Down
1 change: 0 additions & 1 deletion rankmirror-ng.AppDir/.DirIcon

This file was deleted.

Empty file.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Desktop Entry]
Name=rankmirror-ng
Exec=rankmirror-ng
Icon=rankmirror-ng
Icon=yast-services-manager
Type=Application
Categories=System;Utility;
Exec=rankmirror-ng
Categories=System;
1 change: 1 addition & 0 deletions yast-services-manager.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0143c7b

Please sign in to comment.