Skip to content

Commit

Permalink
go update
Browse files Browse the repository at this point in the history
  • Loading branch information
shoce committed Aug 19, 2024
1 parent a6bdb40 commit e1bcc5d
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 14 deletions.
53 changes: 50 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
echo "VERSION=$VERSION" >> $GITHUB_ENV
- uses: actions/setup-go@v4
with:
go-version: '^1.22.4'
go-version: '^1.23.0'
- name: go build
run: GOOS=linux GOARCH=amd64 go build -o ${{ github.event.repository.name }}.linux.amd64 -trimpath -ldflags ' -X main.Version='$VERSION
- name: gzip
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
echo "VERSION=$VERSION" >> $GITHUB_ENV
- uses: actions/setup-go@v4
with:
go-version: '^1.22.4'
go-version: '^1.23.0'
- name: go build
run: GOOS=linux GOARCH=amd64 go build -o ${{ github.event.repository.name }}.linux.amd64 -trimpath -ldflags ' -X main.Version='$VERSION
- name: gzip
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
echo "VERSION=$VERSION" >> $GITHUB_ENV
- uses: actions/setup-go@v4
with:
go-version: '^1.22.4'
go-version: '^1.23.0'
- name: go build
run: GOOS=linux GOARCH=amd64 go build -o ${{ github.event.repository.name }}.linux.amd64 -trimpath -ldflags ' -X main.Version='$VERSION
- name: gzip
Expand Down Expand Up @@ -218,3 +218,50 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: gh release create $VERSION ${{ github.event.repository.name }}.linux.amd64.gz --notes-file release.notes..text

build-push-alpine-3-20:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# https://github.com/jirutka/setup-alpine
- uses: jirutka/setup-alpine@v1
with:
branch: v3.20
arch: x86_64
packages: >
go
- name: version
run: |
BUILD_OS=alpine-3.20
echo "BUILD_OS:$BUILD_OS"
echo "BUILD_OS=$BUILD_OS" >> $GITHUB_ENV
VERSION=$( date '+%y%m%d.%H%M.0' )-$BUILD_OS
echo "VERSION:$VERSION"
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: go build
shell: alpine.sh {0}
run: GOOS=linux GOARCH=amd64 go build -o ${{ github.event.repository.name }}.linux.amd64 -trimpath -ldflags ' -X main.Version='$VERSION
- name: gzip
shell: alpine.sh {0}
run: gzip -k ${{ github.event.repository.name }}.linux.amd64
- name: list files
shell: alpine.sh {0}
run: ls -l -a
- name: release notes
shell: alpine.sh {0}
run: |
{
echo "curl -sSL https://github.com/shoce/${{ github.event.repository.name }}/releases/download/$VERSION/${{ github.event.repository.name }}.linux.amd64.gz | gunzip | put /bin/${{ github.event.repository.name }}-$BUILD_OS 755"
echo "curl -sSL https://github.com/shoce/${{ github.event.repository.name }}/releases/download/$VERSION/${{ github.event.repository.name }}.linux.amd64.gz | gunzip | put /bin/${{ github.event.repository.name }} 755"
echo
echo /etc/alpine-release:
cat /etc/alpine-release
echo
echo go version:
go version
} >release.notes..text
- name: gh release
shell: bash
env:
GH_TOKEN: ${{ github.token }}
run: gh release create $VERSION ${{ github.event.repository.name }}.linux.amd64.gz --notes-file release.notes..text

6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ go 1.21
require (
github.com/ipfs/go-cid v0.4.1
github.com/multiformats/go-multihash v0.2.3
golang.org/x/crypto v0.24.0
golang.org/x/net v0.26.0
golang.org/x/crypto v0.26.0
golang.org/x/net v0.28.0
)

require (
Expand All @@ -18,6 +18,6 @@ require (
github.com/multiformats/go-multibase v0.2.0 // indirect
github.com/multiformats/go-varint v0.0.7 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
golang.org/x/sys v0.21.0 // indirect
golang.org/x/sys v0.24.0 // indirect
lukechampine.com/blake3 v1.3.0 // indirect
)
16 changes: 8 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ github.com/multiformats/go-varint v0.0.7 h1:sWSGR+f/eu5ABZA2ZpYKBILXTTs9JWpdEM/n
github.com/multiformats/go-varint v0.0.7/go.mod h1:r8PUYw/fD/SjBCiKOoDlGF6QawOELpZAu9eioSos/OU=
github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI=
golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM=
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw=
golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54=
golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE=
golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws=
golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA=
golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0=
golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg=
golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU=
golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk=
lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE=
lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k=

0 comments on commit e1bcc5d

Please sign in to comment.