-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from vkopitsa/feature/add-support-account
[accounts]: add support
- Loading branch information
Showing
19 changed files
with
777 additions
and
569 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
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,52 @@ | ||
on: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
name: Create Release | ||
|
||
env: | ||
RELNAME: mono_personal_tgbot | ||
GOARCH: amd64 | ||
|
||
jobs: | ||
build: | ||
name: Create Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18.x | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.OS }}-go-${{ env.cache-name }}- | ||
${{ runner.OS }}-go- | ||
${{ runner.OS }}- | ||
- name: Build artifacts | ||
run: | | ||
CGO_ENABLED=0 GOOS=linux GOARCH=${GOARCH} go build -ldflags "-s -w" -o ./release/${RELNAME}-linux-${GOARCH} *.go | ||
CGO_ENABLED=0 GOOS=darwin GOARCH=${GOARCH} go build -ldflags "-s -w" -o ./release/${RELNAME}-darwin-${GOARCH} *.go | ||
CGO_ENABLED=0 GOOS=windows GOARCH=${GOARCH} go build -ldflags "-s -w" -o ./release/${RELNAME}-windows-${GOARCH}.exe *.go | ||
zip --junk-paths ./release/${RELNAME}-linux-${GOARCH}.zip ./release/${RELNAME}-linux-${GOARCH} | ||
zip --junk-paths ./release/${RELNAME}-darwin-${GOARCH}.zip ./release/${RELNAME}-darwin-${GOARCH} | ||
zip --junk-paths ./release/${RELNAME}-windows-${GOARCH}.zip ./release/${RELNAME}-windows-${GOARCH}.exe | ||
- name: Release | ||
uses: docker://antonyurchenko/git-release:latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
ALLOW_EMPTY_CHANGELOG: true | ||
DRAFT_RELEASE: true | ||
CHANGELOG_FILE: none | ||
with: | ||
args: release/*.zip |
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,34 @@ | ||
on: [push, pull_request] | ||
|
||
name: Test | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: 1.18.x | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.OS }}-go-${{ env.cache-name }}- | ||
${{ runner.OS }}-go- | ||
${{ runner.OS }}- | ||
- name: Verify dependencies | ||
run: go mod verify | ||
|
||
- name: Run Gosec | ||
uses: securego/gosec@master | ||
with: | ||
args: '-exclude=G104 ./...' | ||
|
||
- name: Run tests | ||
run: go test -race -vet=off ./... |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# builder | ||
FROM golang:alpine as builder | ||
FROM golang:1.18-alpine as builder | ||
|
||
WORKDIR / | ||
|
||
|
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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
Oops, something went wrong.