Skip to content

Improve tests by using temporary Git config #80

Improve tests by using temporary Git config

Improve tests by using temporary Git config #80

Workflow file for this run

name: ci
on:
pull_request:
push:
branches:
- main
tags:
- v*
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
steps:
- uses: actions/checkout@v4
- run: git config url.https://github.com/.insteadOf ssh://git@github.com/
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- run: go mod download
- run: go test ./...
- run: go build .
- run: ./git-get github.com/arbourd/git-get
bin:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- run: go mod download
- uses: goreleaser/goreleaser-action@v5
with:
version: latest
install-only: true
- if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
run: goreleaser release --clean --snapshot
# Release binaries on release tags
- if: startsWith(github.ref, 'refs/tags/v')
run: goreleaser release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}