Skip to content

Commit

Permalink
chore: overhaul ci workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
muety committed Aug 6, 2022
1 parent 3ea96b9 commit cc33c99
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 86 deletions.
43 changes: 0 additions & 43 deletions .github/workflows/linux-build-on-release.yml

This file was deleted.

51 changes: 51 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Build Telepush on Linux

on:
release:
types:
- published

jobs:
build-and-release:
name: Build and add to Release

strategy:
fail-fast: false
matrix:
platform: [ ubuntu-latest, macos-latest, windows-latest ]
include:
- platform: ubuntu-latest
alias: linux
- platform: macos-latest
alias: mac
- platform: windows-latest
alias: win

runs-on: ${{ matrix.platform }}
steps:

- name: Set up Go 1.x
uses: actions/setup-go@v2
with:
go-version: ^1.19
id: go

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

- name: Get dependencies
run: go get

- name: Build
run: go build -v -o telepush_${{ matrix.alias }}_amd64 .

- name: Upload built executable to release (Win)
uses: softprops/action-gh-release@v1
if: runner.os == 'Windows'
with:
files: telepush_${{ matrix.alias }}_amd64
- name: Upload built executable to release (Linux / Mac)
uses: softprops/action-gh-release@v1
if: runner.os != 'Windows'
with:
files: telepush_${{ matrix.alias }}_amd64.exe
43 changes: 0 additions & 43 deletions .github/workflows/windows-build-on-release.yml

This file was deleted.

4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,10 @@ They include:
* `telepush_messages_total{origin="string", type="string"}`
* `telepush_requests_total{success="string"}`

## 🐞 Troubleshooting
### Error: `panic: template: pattern matches no files: *.tpl.html`
When running Telepush as a single executable, you **must not use dev mode** unless Telepush's source code is located inside the same directory. Make sure to not pass `-env dev` in this case.

## 📓 License

MIT @ [Ferdinand Mütsch](https://muetsch.io)

0 comments on commit cc33c99

Please sign in to comment.