From 45767a8cbcc75e69ec9d15ef77b31efb33aadcdf Mon Sep 17 00:00:00 2001 From: Niels Hofmans Date: Thu, 7 Nov 2024 08:39:17 +0100 Subject: [PATCH] fix: update gocross version --- .github/workflows/release.yml | 92 +++++++++++++++++++---------------- Makefile | 2 +- go.mod | 2 +- 3 files changed, 52 insertions(+), 44 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 76efd30..7373afd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,51 +2,59 @@ name: release on: push: - branches: [master] + branches: [master,main] jobs: + goreleaser: name: Release runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - id: vars - run: | - goVersion=$(grep '^FROM go' .github/go/Dockerfile | cut -d ' ' -f 2 | cut -d ':' -f 2) - echo "go_version=${goVersion}" >> $GITHUB_OUTPUT - echo "Using Go version ${goVersion}" - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: ${{ steps.vars.outputs.go_version }} - - name: release dry run - run: make release-dry-run - - uses: go-semantic-release/action@v1 - id: semantic - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - - name: Set up Git config for tagging - if: steps.semantic.outputs.version != '' - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - git config user.name "${{ github.actor }}" - git config user.email "${{ github.actor }}@users.noreply.github.com" - git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git - - name: Update tags - if: steps.semantic.outputs.version != '' - run: | - TAG=v${{ steps.semantic.outputs.version }} - git push origin :refs/tags/${TAG} - git tag -fa ${TAG} -m "release v${{ steps.semantic.outputs.version }}" - git push origin ${TAG} - - name: setup release environment - run: |- - echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env - - name: release publish - run: make release + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + id: vars + run: | + goVersion=$(grep '^FROM go' .github/go/Dockerfile | cut -d ' ' -f 2 | cut -d ':' -f 2) + echo "go_version=${goVersion}" >> $GITHUB_OUTPUT + echo "Using Go version ${goVersion}" + - + name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ${{ steps.vars.outputs.go_version }} + - + name: release dry run + run: make release-dry-run + - + uses: go-semantic-release/action@v1 + id: semantic + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + - + name: Set up Git config for tagging + if: steps.semantic.outputs.version != '' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git + - + name: Update tags + if: steps.semantic.outputs.version != '' + run: | + TAG=v${{ steps.semantic.outputs.version }} + git push origin :refs/tags/${TAG} + git tag -fa ${TAG} -m "release v${{ steps.semantic.outputs.version }}" + git push origin ${TAG} + - + name: setup release environment + run: |- + echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env + - + name: release publish + run: make release diff --git a/Makefile b/Makefile index aab240c..d7a2f27 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ PACKAGE_NAME := github.com/hazcod/enpass-cli -GOLANG_CROSS_VERSION ?= v1.17.6 +GOLANG_CROSS_VERSION ?= v1.23.2-0 SYSROOT_DIR ?= sysroots SYSROOT_ARCHIVE ?= sysroots.tar.bz2 diff --git a/go.mod b/go.mod index 17eb800..44f52fc 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/hazcod/enpass-cli -go 1.17 +go 1.23 require ( github.com/atotto/clipboard v0.1.4