diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 52635e8..8192b2c 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -3,10 +3,12 @@ name: Build on: push: branches: - - master + - master tags: - - '*' + - "*" + + workflow_dispatch: pull_request: @@ -15,36 +17,37 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - arch: [amd64,arm64] + arch: [amd64, arm64] env: GOOS: linux GOARCH: ${{ matrix.arch }} steps: - - uses: actions/checkout@v2 - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: 1.16 - - name: build - run: make - - name: test - # @fixme: return test for non-amd64 arch when github will add support for other architectures (arm64) - if: ${{ matrix.arch == 'amd64' }} - run: make test - - name: prepare artifact - if: startsWith(github.ref, 'refs/tags/') - run: make package - - name: Get the version - if: startsWith(github.ref, 'refs/tags/') - id: get_version - run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - - uses: xresloader/upload-to-github-release@v1 - if: startsWith(github.ref, 'refs/tags/') - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - file: gotpl-*.tar.gz - overwrite: false - tags: true - draft: false - tag_name: ${{ steps.get_version.outputs.VERSION }} + - uses: actions/checkout@v4 + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: 1.23 + check-latest: true + - name: build + run: make + - name: test + # @fixme: return test for non-amd64 arch when github will add support for other architectures (arm64) + if: ${{ matrix.arch == 'amd64' }} + run: make test + - name: prepare artifact + if: startsWith(github.ref, 'refs/tags/') + run: make package + - name: Get the version + if: startsWith(github.ref, 'refs/tags/') + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} + - uses: xresloader/upload-to-github-release@v1 + if: startsWith(github.ref, 'refs/tags/') + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + file: gotpl-*.tar.gz + overwrite: false + tags: true + draft: false + tag_name: ${{ steps.get_version.outputs.VERSION }} diff --git a/go.mod b/go.mod index 6772a28..c79eff5 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/wodby/gotpl +module github.com/inrage/gotpl -go 1.15 +go 1.23