-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added workflow for GH and GHCR releases
- Loading branch information
1 parent
f5c985a
commit 38ed076
Showing
3 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Create Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22.1 | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build | ||
run: | | ||
env GOOS=darwin GOARCH=arm64 go build -ldflags "-w -s" -o logicng-service-macos-arm main.go | ||
env GOOS=darwin GOARCH=amd64 go build -ldflags "-w -s" -o logicng-service-macos-amd main.go | ||
env GOOS=linux GOARCH=amd64 go build -ldflags "-w -s" -o logicng-service-linux main.go | ||
env GOOS=windows GOARCH=amd64 go build -ldflags "-w -s" -o logicng-service-win.exe main.go | ||
- name: Build and Push Docker Image | ||
run: | | ||
docker build . -t ghcr.io/booleworks/logicng-service:${{ github.ref }} | ||
docker push ghcr.io/booleworks/logicng-service:${{ github.ref }} | ||
- name: Create GitHub Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: | | ||
logicng-service-macos-arm | ||
logicng-service-macos-amd | ||
logicng-service-linux | ||
logicng-service-win.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
*.swp | ||
|
||
# build | ||
logicng-service | ||
logicng-service* | ||
|
||
# docs | ||
docs/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM alpine:latest | ||
|
||
ENV TIMEOUT 5s | ||
|
||
COPY logicng-service-linux /opt/logicng-service | ||
|
||
EXPOSE 8080 | ||
CMD /opt/logicng-service --timeout $TIMEOUT |