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

feat: update plugin lib

parent fe9115bd
Branches
Tags v1.2.0
No related merge requests found
...@@ -28,12 +28,8 @@ jobs: ...@@ -28,12 +28,8 @@ jobs:
- uses: actions/setup-go@v1 - uses: actions/setup-go@v1
with: with:
go-version: 1.14 go-version: 1.14
- run: go build ./cmd/provider-gitlab/
- name: Build - run: go test -v ./...
run: go build ./cmd/provider-gitlab/
- name: Test
run: go test -v ./...
release: release:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: build needs: build
...@@ -43,8 +39,7 @@ jobs: ...@@ -43,8 +39,7 @@ jobs:
with: with:
go-version: 1.14 go-version: 1.14
- run: echo "::add-path::~/go/bin" - run: echo "::add-path::~/go/bin"
- name: Get release dependencies - run: |
run: |
go get github.com/mitchellh/gox go get github.com/mitchellh/gox
go get github.com/tcnksm/ghr go get github.com/tcnksm/ghr
- uses: go-semantic-release/action@v1 - uses: go-semantic-release/action@v1
...@@ -53,7 +48,8 @@ jobs: ...@@ -53,7 +48,8 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }}
ghr: true ghr: true
- run: | - 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/provider-gitlab/ gox -parallel 4 -osarch="linux/amd64 darwin/amd64 linux/arm windows/amd64" -ldflags="-extldflags '-static' -s -w -X github.com/go-semantic-release/provider-gitlab/pkg/provider.PVERSION=${{steps.semrel.outputs.version}}" -output="bin/{{.Dir}}_v${{steps.semrel.outputs.version}}_{{.OS}}_{{.Arch}}" ./cmd/provider-gitlab/
cd bin/ && shasum -a 256 * > ./provider-gitlab_v${{steps.semrel.outputs.version}}_checksums.txt && cd -
if: steps.semrel.outputs.version != '' if: steps.semrel.outputs.version != ''
- run: ghr $(cat .ghr) bin/ - run: ghr $(cat .ghr) bin/
if: steps.semrel.outputs.version != '' if: steps.semrel.outputs.version != ''
......
This diff is collapsed.
...@@ -12,6 +12,8 @@ import ( ...@@ -12,6 +12,8 @@ import (
"github.com/xanzy/go-gitlab" "github.com/xanzy/go-gitlab"
) )
var PVERSION = "dev"
type GitLabRepository struct { type GitLabRepository struct {
projectID string projectID string
branch string branch string
...@@ -177,3 +179,7 @@ func (repo *GitLabRepository) CreateRelease(release *provider.CreateReleaseConfi ...@@ -177,3 +179,7 @@ func (repo *GitLabRepository) CreateRelease(release *provider.CreateReleaseConfi
func (repo *GitLabRepository) Name() string { func (repo *GitLabRepository) Name() string {
return "GitLab" return "GitLab"
} }
func (repo *GitLabRepository) Version() string {
return PVERSION
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment