Skip to content

Commit

Permalink
feat: add features
Browse files Browse the repository at this point in the history
  • Loading branch information
geekdada committed Jan 12, 2021
1 parent 665107f commit 866231c
Show file tree
Hide file tree
Showing 18 changed files with 730 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Go
on: [push, pull_request]
jobs:

build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Setup Go
uses: actions/setup-go@v2
with:
go-version: 1.15.x

- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Cache go module
uses: actions/cache@v2
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Get dependencies, run test and static check
run: |
go vet ./...
- name: Build
if: startsWith(github.ref, 'refs/tags/')
run: make -j release

- name: Upload Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: release/*
draft: true
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,9 @@

# Dependency directories (remove the comment below to include it)
# vendor/

/release
/artifact

.idea
.DS_Store
23 changes: 23 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
NAME=linguee
BINDIR=artifact
RELEASEDIR=release
VERSION=$(shell git describe --tags || echo "unknown")
GOBUILD=go build

build:
GOARCH=amd64 GOOS=darwin $(GOBUILD) -o $(BINDIR)/$(NAME) .

prepare_assets:
mkdir -p $(BINDIR)
mkdir -p $(RELEASEDIR)
cp ./assets/* $(BINDIR)/
sed -i 's/WORKFLOW_VERSION/$(VERSION)/g' $(BINDIR)/info.plist

zip_artifact:
chmod +x $(BINDIR)/linguee
cd $(BINDIR) && zip -r "../$(RELEASEDIR)/alfred.alfredworkflow" "./" && cd -

release: prepare_assets build zip_artifact

clean:
rm $(BINDIR)/*
Binary file added assets/036C5ECC-732C-4512-8395-1628A720A18C.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/1D670FAB-55AA-440B-8C1F-CD3066B06299.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/3B304A2E-FEF0-4287-B806-F5B73B9F9A69.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/4AA66C58-C277-43FA-99AA-D8F39B0E4844.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/62198BCB-A29A-4140-B226-75D3EA3BD813.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/691E6A0B-7A16-4785-8D6B-A2DEC108A34F.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/B06EFA00-BD47-48B9-BF13-A73052018A79.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/CC1152B4-3806-4B77-9F06-C36AC83DF192.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/FC0A4974-C928-4932-8AFD-97CA6426AA0F.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 866231c

Please sign in to comment.