Skip to content

Commit

Permalink
added github action
Browse files Browse the repository at this point in the history
  • Loading branch information
vojty committed Feb 3, 2022
1 parent 26fc0b9 commit e8cb86c
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Build/release

on:
workflow_dispatch:

push:
tags:
- "*"

jobs:
release:
runs-on: macos-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Install Node.js, NPM and Yarn
uses: actions/setup-node@v1
with:
node-version: "16.x"

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Install golang
uses: actions/setup-go@v2
with:
go-version: "^1.17.6"

- name: Build
run: |
go get
yarn build
- name: Create archives
working-directory: ./dist
run: |
for i in *; do zip -r "${i%/}.zip" "$i"; done
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*.zip
file_glob: true
tag: ${{ github.ref }}
overwrite: true

0 comments on commit e8cb86c

Please sign in to comment.