From 516220a6d6c89050250b8a9bdc97af6550080ebb Mon Sep 17 00:00:00 2001 From: Paulo Bittencourt Date: Thu, 20 May 2021 13:04:12 -0400 Subject: [PATCH 1/4] Trying out release action --- .github/workflows/test.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b1c90a6..50abd03 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,6 +10,9 @@ jobs: build: runs-on: ubuntu-latest + env: + GOOS: linux + GOARCH: amd64 steps: - uses: actions/checkout@v2 @@ -20,3 +23,15 @@ jobs: - name: Test run: go test -mod=vendor -v ./... + + - name: Build + run: go build + + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + automatic_release_tag: "latest" + prerelease: true + title: "Development Build" + files: | + affected From 27809183f8b5a64e038e8468b311f3908fe78212 Mon Sep 17 00:00:00 2001 From: Paulo Bittencourt Date: Thu, 20 May 2021 13:04:26 -0400 Subject: [PATCH 2/4] Use mod=vendor --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 50abd03..de127a4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,7 +25,7 @@ jobs: run: go test -mod=vendor -v ./... - name: Build - run: go build + run: go build -mod=vendor - uses: "marvinpinto/action-automatic-releases@latest" with: From 36fd9ec6edf232c63bcb98d0f5c77dc0de205102 Mon Sep 17 00:00:00 2001 From: Paulo Bittencourt Date: Thu, 20 May 2021 16:29:27 -0400 Subject: [PATCH 3/4] Try getting branch from ref --- .github/workflows/test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index de127a4..8c63e66 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Go +name: Test on: push: @@ -27,10 +27,14 @@ jobs: - name: Build run: go build -mod=vendor + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/heads\//} + - uses: "marvinpinto/action-automatic-releases@latest" with: repo_token: "${{ secrets.GITHUB_TOKEN }}" - automatic_release_tag: "latest" + automatic_release_tag: "latest_${{ steps.get_version.outputs.VERSION }}" prerelease: true title: "Development Build" files: | From b23a8f83795bb169863f97573fcf159a0a8f6cea Mon Sep 17 00:00:00 2001 From: Paulo Bittencourt Date: Thu, 20 May 2021 16:34:59 -0400 Subject: [PATCH 4/4] Tweak ref parsing --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8c63e66..c419590 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,7 +29,7 @@ jobs: - name: Get the version id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/heads\//} + run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/pull\//} - uses: "marvinpinto/action-automatic-releases@latest" with: