forked from OliveTin/OliveTin
-
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.
- Loading branch information
1 parent
d639a80
commit 4e1b038
Showing
11 changed files
with
189 additions
and
27 deletions.
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
name: "Build Snapshot" | ||
|
||
on: | ||
- push | ||
#- push | ||
- workflow_dispatch | ||
|
||
jobs: | ||
|
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 |
---|---|---|
|
@@ -2,9 +2,9 @@ | |
name: "Build Tag" | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
#push: | ||
# tags: | ||
# - '*' | ||
|
||
jobs: | ||
build-tag: | ||
|
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
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
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,89 @@ | ||
name: CI | ||
|
||
on: | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# build targets | ||
include: | ||
- goos: linux | ||
goarch: amd64 | ||
- goos: linux | ||
goarch: arm64 | ||
#- goos: linux | ||
# goarch: '386' | ||
- goos: darwin | ||
goarch: amd64 | ||
- goos: darwin | ||
goarch: arm64 | ||
- goos: windows | ||
goarch: amd64 | ||
- goos: windows | ||
goarch: arm64 | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v2.3.4 | ||
with: | ||
lfs: true | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.20' | ||
|
||
- name: Build for Linux | ||
env: | ||
GOOS: ${{ matrix.goos }} | ||
GOARCH: ${{ matrix.goarch }} | ||
|
||
run: | | ||
export GO_PATH=~/go | ||
export PATH=$PATH:$GO_PATH/bin | ||
GOOS=linux GOARCH=amd64 make grpc | ||
CGO_ENABLED=0 go build -x -v -trimpath -ldflags "-w -s -buildid=" -o "OliveTin" github.com/OliveTin/OliveTin/cmd/OliveTin | ||
tar -zcvf OliveTin_${GOOS}-${GOARCH}.tar.gz OliveTin config.yaml webui/ | ||
- name: Upload to artifact storage | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: OliveTin_${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz | ||
if-no-files-found: error | ||
# only meant for sharing with the publish job | ||
retention-days: 1 | ||
|
||
publish: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
path: ./ | ||
# | ||
# - uses: "marvinpinto/action-automatic-releases@latest" | ||
# with: | ||
# repo_token: "${{ secrets.GITHUB_TOKEN }}" | ||
# prerelease: false | ||
# files: | | ||
# NI_* | ||
# id: "automatic_releases" | ||
|
||
- name: Create tag | ||
id: create_tag | ||
run: | | ||
tag=$(date +%Y-%m-%d_%H%M%S) | ||
echo "::set-output name=tag::$tag" | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: artifact/OliveTin_* | ||
tag_name: ${{ steps.create_tag.outputs.tag }} | ||
#body_path: rel_note.txt | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
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
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
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
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
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