Update actions/checkout action to v4 #42
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: | |
- master | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
ci-build: | |
strategy: | |
matrix: | |
go-version: [ 1.14, 1.15.1 ] | |
os: [ ubuntu-latest, ubuntu-20.04, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: git fetch --prune --unshallow | |
- uses: actions/cache@v3 | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
- name: Install Go ${{ matrix.go-version }} | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Go version | |
run: go version | |
- name: Test | |
run: go test ./... | |
- name: Build | |
run: go build | |
release: | |
needs: [ci-build] | |
name: Release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 12 | |
- name: Install dependencies | |
run: npm install -g semantic-release @semantic-release/github @semantic-release/release-notes-generator conventional-changelog-conventionalcommits conventional-changelog-eslint | |
- name: Release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: semantic-release $DRY_RUN_OPT | |
- name: Set up Go 1.x | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ^1.14 | |
- run: docker login docker.pkg.github.com -u docker -p ${{ secrets.GITHUB_TOKEN }} | |
- uses: goreleaser/goreleaser-action@v4 | |
with: | |
version: v0.142.0 | |
args: release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |