Skip to content

Commit

Permalink
fix: setup command get last tag
Browse files Browse the repository at this point in the history
  • Loading branch information
lpsm-dev committed Jan 3, 2022
1 parent 8fb0407 commit f3d4f2d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
if: github.event.inputs.git-ref == 'main'

goreleaser:
name: "Create Go Release"
name: "GoReleaser"
needs: release
runs-on: ubuntu-20.04

Expand All @@ -50,8 +50,8 @@ jobs:
git tag --list
- name: Read .go-version
run: echo ::set-output name=GOVERSION::$(cat .go-version)
id: goversion
run: echo ::set-output name=GOVERSION::$(cat .go-version)

- name: Set up Go
uses: actions/setup-go@v2
Expand All @@ -61,27 +61,23 @@ jobs:
- name: Get Details
id: get_details
run: |
echo ::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}
echo ::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}
echo "SOURCE_TAG=$(git describe --tags --abbrev=0)" >> $GITHUB_ENV
echo "::set-output name=SOURCE_NAME::${GITHUB_REF#refs/*/}"
echo "::set-output name=SOURCE_BRANCH::${GITHUB_REF#refs/heads/}"
echo "::set-output name=SOURCE_TAG::$(git describe --tags --abbrev=0)"
- run: |
echo $SOURCE_NAME
echo $SOURCE_BRANCH
echo $SOURCE_TAG
env:
SOURCE_NAME: ${{ steps.get_details.outputs.SOURCE_NAME }}
SOURCE_BRANCH: ${{ steps.get_details.outputs.SOURCE_BRANCH }}
SOURCE_TAG: ${{ steps.get_details.outputs.SOURCE_TAG }}
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist --debug
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
CLIENT_VERSION: ${{ steps.get_details.outputs.SOURCE_TAG }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
GIT_BRANCH: ${{ steps.get_details.outputs.SOURCE_BRANCH }}
GO_VERSION: ${{ steps.goversion.outputs.GOVERSION }}
GORELEASER_CURRENT_TAG: ${{ steps.get_details.outputs.SOURCE_TAG }}
2 changes: 0 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,5 @@ before:
- make clean
- go generate ./...
- go mod download
- chmod a+x ./scripts/variables.sh
- ./scripts/variables.sh
github_urls:
download: https://github.com
8 changes: 0 additions & 8 deletions scripts/variables.sh

This file was deleted.

0 comments on commit f3d4f2d

Please sign in to comment.