Skip to content

Commit efaa8e0

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 307d706 + ec29478 commit efaa8e0

File tree

2 files changed

+44
-1
lines changed

2 files changed

+44
-1
lines changed

.github/workflows/release.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- release/*
7+
create:
8+
tags:
9+
- v*
10+
jobs:
11+
build:
12+
name: Build
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Set up Go 1.13
16+
uses: actions/setup-go@v1
17+
with:
18+
go-version: 1.13
19+
20+
- name: Check out source code
21+
uses: actions/checkout@master
22+
23+
- name: Build OS X binary
24+
run: GOOS=darwin GOARCH=amd64 go build -o $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)-darwin64 -a -ldflags '-s -w' .
25+
26+
- name: Build Linux binary
27+
run: GOOS=linux GOARCH=amd64 go build -o $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)-linux64 -a -ldflags '-s -w' .
28+
29+
- name: Build ARM binary
30+
run: GOOS=linux GOARCH=arm GOARM=6 go build -o $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)-arm -a -ldflags '-s -w' .
31+
32+
- name: Build windows binary
33+
run: GOOS=windows GOARCH=amd64 go build -o $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2).exe -a -ldflags '-s -w' .
34+
35+
- name: Install olsu
36+
run: wget https://github.com/Telling/olsu/releases/download/v0.1.0/olsu-linux-amd64.zip && unzip olsu-linux-amd64.zip && chmod +x olsu-linux-amd64 && pwd && ls -la
37+
38+
- name: Create or update release
39+
env:
40+
OLSU_TOKEN: ${{ secrets.GITHUB_TOKEN }}
41+
OLSU_DELETE_RELEASE: yes
42+
run: ./olsu-linux-amd64 -o $(echo $GITHUB_REPOSITORY | cut -d "/" -f 1) -r $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2) "Latest release" "latest" "Automatic release" $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)-darwin64 $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)-linux64 $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)-arm $(echo $GITHUB_REPOSITORY | cut -d "/" -f 2).exe

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# go-githublistener
2+
![Release](https://github.com/ad/go-githublistener/workflows/Release/badge.svg)
23

34
Register your new application on Github: https://github.com/settings/applications/new
45

@@ -18,4 +19,4 @@ GO_GITHUB_LISTENER_TELEGRAM_TOKEN=
1819

1920
Start the server by executing make dev or make up
2021

21-
Navigate to http://localhost:8080 on your browser.
22+
Navigate to http://localhost:8080 on your browser.

0 commit comments

Comments
 (0)