Use unset which is the preferred way to delete a value #92
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: 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://[email protected]/ | |
- 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 }} |