Skip to content

Commit

Permalink
Updated go mod and workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
RicYaben committed Sep 9, 2022
1 parent 4cfb32d commit 99f28df
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 44 deletions.
59 changes: 29 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,46 @@ name: release
on:
push:
paths-ignore:
- '**.md'
- "**.md"
pull_request:
paths-ignore:
- '**.md'
- "**.md"

jobs:
build:
strategy:
matrix:
go-version: [1.16]
go-version: [1.18]
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Checkout
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Cache Go modules
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Cache Go modules
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build
if: github.event_name == 'push' && (matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest')
run: cd cmd/riotpot && go build -o bin/ -v

- name: Build
if: github.event_name == 'push' && (matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest')
run: cd cmd/riotpot && go build -o bin/ -v

# Autoreleaser https://goreleaser.com/ci/actions/
# it MAY need secrets! more: https://docs.github.com/en/actions/reference/encrypted-secrets
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
workdir: cmd/riotpot
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Autoreleaser https://goreleaser.com/ci/actions/
# it MAY need secrets! more: https://docs.github.com/en/actions/reference/encrypted-secrets
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
workdir: cmd/riotpot
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,15 @@ riotpot-build-plugins: $(PLUGINS_DIR)/*
done
riotpot-build-local-plugin: $(PLUGINS_DIR)/*
for folder in $^ ; do \
go build -buildmode=plugin -o ${GO_BIN_DIR}/$${folder}/plugin.so $${folder}/*.go; \
go build -buildmode=plugin -o ./$${folder}/plugin.so ./$${folder}/*.go; \
done

riotpot-builder: \
set_container_build \
riotpot-build \
riotpot-build-plugins
riotpot-build-local: \
riotpot-build \
riotpot-build-local-plugin \
go install ./riotpot

riotpot-install:
riotpot-build \
Expand Down
22 changes: 11 additions & 11 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -16,46 +16,46 @@ require (

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dsnet/golib/memfile v1.0.0 // indirect
github.com/gin-contrib/sse v0.1.0 // indirect
github.com/go-playground/locales v0.14.0 // indirect
github.com/go-playground/universal-translator v0.18.0 // indirect
github.com/go-playground/validator/v10 v10.11.0 // indirect
github.com/goccy/go-json v0.9.11 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/leodido/go-urn v1.2.1 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/montanaflynn/stats v0.6.6 // indirect
github.com/pelletier/go-toml/v2 v2.0.5 // indirect
github.com/pion/dtls/v2 v2.1.5 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/udp v0.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/plgd-dev/kit/v2 v2.0.0-20211006190727-057b33161b90 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/ugorji/go/codec v1.2.7 // indirect
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.1 // indirect
github.com/xdg-go/stringprep v1.0.3 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
)

require (
github.com/dsnet/golib/memfile v1.0.0 // indirect
github.com/gin-gonic/gin v1.8.1
github.com/golang/snappy v0.0.4 // indirect
github.com/klauspost/compress v1.15.9 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.16 // indirect
github.com/pion/dtls/v2 v2.1.5 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/transport v0.13.1 // indirect
github.com/pion/udp v0.1.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/plgd-dev/kit/v2 v2.0.0-20211006190727-057b33161b90 // indirect
github.com/rakyll/statik v0.1.7
github.com/rs/zerolog v1.28.0
github.com/xdg-go/pbkdf2 v1.0.0 // indirect
github.com/xdg-go/scram v1.1.1 // indirect
github.com/xdg-go/stringprep v1.0.3 // indirect
github.com/youmark/pkcs8 v0.0.0-20201027041543-1326539a0a0a // indirect
go.uber.org/atomic v1.10.0 // indirect
golang.org/x/exp v0.0.0-20220827204233-334a2380cb91
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b // indirect
golang.org/x/sync v0.0.0-20220819030929-7fc1605a5dde // indirect
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261 // indirect
golang.org/x/text v0.3.7 // indirect
)
Binary file added riotpot
Binary file not shown.

0 comments on commit 99f28df

Please sign in to comment.