Skip to content

Commit

Permalink
Merge pull request #10 from ShimShtein/first_build
Browse files Browse the repository at this point in the history
Fix first build
  • Loading branch information
ShimShtein authored Apr 4, 2022
2 parents bebe9be + b880bd6 commit 6f1fab3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
push:
tags:
- 'v*'
pull_request:
paths:
- '**/.github/**/*'

# workflow tasks
jobs:
Expand All @@ -19,11 +22,16 @@ jobs:
tagRegexGroup: 1 # Optional. Default is 1.
- name: Checkout the repository
uses: actions/checkout@v2
# - uses: actions/setup-go@v3
# with:
# go-version: '^1.17.0' # The Go version to download (if necessary) and use.
# - run: |
# go vet .
- name: Generate build files
uses: thatisuday/go-cross-build@v1.1.0
with:
platforms: 'linux/amd64'
package: 'src'
package: '.'
name: 'yggdrasil-worker-forwarder-${{ steps.tagName.outputs.tag }}'
compress: 'true'
dest: 'dist'
Expand All @@ -34,6 +42,7 @@ jobs:
env:
VERSION: '${{ steps.tagName.outputs.tag }}'
- name: Upload binaries to release
if: "${{ steps.tagName.outputs.tag != '' }}" # tag will be empty on pull requests, no publishing needed
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package main

import (
"context"
"fmt"
"net"
"os"
"time"
"fmt"
"path/filepath"
"strings"
"time"

"git.sr.ht/~spc/go-log"
"github.com/pelletier/go-toml"
Expand All @@ -24,8 +25,7 @@ func main() {
if ok {
config, err := toml.LoadFile(configFile)
if err != nil {
fmt.Errorf("cannot load config: %w", err)
return
log.Fatal(fmt.Errorf("cannot load config: %w", err))
}

for _, value := range config.GetArray("env").([]string) {
Expand Down

0 comments on commit 6f1fab3

Please sign in to comment.