1.2.1 #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
# Default minimum version of Go to support. | |
DEFAULT_GO_VERSION: 1.21 | |
jobs: | |
release: | |
runs-on: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- run: ls -R | |
- name: Get version | |
id: vars | |
run: echo "version=$(cat ./version)" >> $GITHUB_OUTPUT | |
- name: Clone envs from gitlab | |
run: | | |
rm -rf .git/ .github/ ./* | |
ls -R -la | |
git clone https://gitlab-ci-token:${{ secrets.GITLAB_CR_PAT }}@gitlab.com/target-digital-transformation/environment-store.git . | |
git tag | |
git checkout ${{ steps.vars.outputs.version }} | |
git remote set-url origin [email protected]:tespkg/enva-release | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
# either 'goreleaser' (default) or 'goreleaser-pro' | |
distribution: goreleaser | |
# 'latest', 'nightly', or a semver | |
version: "~> v2" | |
args: release --clean | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GORELEASER_CURRENT_TAG: ${{ steps.vars.outputs.version }} | |
GORELEASER_PREVIOUS_TAG: ${{ steps.vars.outputs.version }} |