defer 可以正确写入后续修改的指针变量 #9
Workflow file for this run
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
#on: | |
# push: | |
# branches: [ "master" ] | |
# pull_request: | |
# branches: [ "master" ] | |
name: Latest Release | |
jobs: | |
build: | |
name: GoReleaser build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 # See: https://goreleaser.com/ci/actions/ | |
- name: Set up Go 1.21.4 | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.21.4 | |
id: go | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v5 | |
with: | |
version: latest | |
args: release --clean | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GO_RELEASER_GITHUB_TOKEN }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |