Skip to content
Snippets Groups Projects
Commit f7c5df3f authored by Christoph Witzko's avatar Christoph Witzko
Browse files

feat: updater plugin lib

parent 14383e33
Branches
No related tags found
No related merge requests found
......@@ -28,12 +28,8 @@ jobs:
- uses: actions/setup-go@v1
with:
go-version: 1.14
- name: Build
run: go build ./cmd/condition-gitlab/
- name: Test
run: go test -v ./...
- run: go build ./cmd/condition-gitlab/
- run: go test -v ./...
release:
runs-on: ubuntu-latest
needs: build
......@@ -43,8 +39,7 @@ jobs:
with:
go-version: 1.14
- run: echo "::add-path::~/go/bin"
- name: Get release dependencies
run: |
- run: |
go get github.com/mitchellh/gox
go get github.com/tcnksm/ghr
- uses: go-semantic-release/action@v1
......@@ -53,7 +48,8 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
ghr: true
- run: |
gox -parallel 4 -osarch="linux/amd64 darwin/amd64 linux/arm windows/amd64" -ldflags="-extldflags '-static' -s -w" -output="bin/{{.Dir}}_v${{steps.semrel.outputs.version}}_{{.OS}}_{{.Arch}}" ./cmd/condition-gitlab/
gox -parallel 4 -osarch="linux/amd64 darwin/amd64 linux/arm windows/amd64" -ldflags="-extldflags '-static' -s -w -X github.com/go-semantic-release/condition-gitlab/pkg/condition.CIVERSION=${{steps.semrel.outputs.version}}" -output="bin/{{.Dir}}_v${{steps.semrel.outputs.version}}_{{.OS}}_{{.Arch}}" ./cmd/condition-gitlab/
cd bin/ && shasum -a 256 * > ./condition-gitlab_v${{steps.semrel.outputs.version}}_checksums.txt && cd -
if: steps.semrel.outputs.version != ''
- run: ghr $(cat .ghr) bin/
if: steps.semrel.outputs.version != ''
......
......@@ -3,6 +3,6 @@ module github.com/go-semantic-release/condition-gitlab
go 1.14
require (
github.com/go-semantic-release/semantic-release/v2 v2.1.0
github.com/go-semantic-release/semantic-release/v2 v2.3.0
github.com/stretchr/testify v1.6.1
)
This diff is collapsed.
......@@ -5,6 +5,8 @@ import (
"os"
)
var CIVERSION = "dev"
type GitLab struct {
}
......@@ -12,6 +14,10 @@ func (gl *GitLab) Name() string {
return "GitLab CI"
}
func (gl *GitLab) Version() string {
return CIVERSION
}
func (gl *GitLab) GetCurrentBranch() string {
return os.Getenv("CI_COMMIT_BRANCH")
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment