鈫楋笍 all: bump version to 1.4.0 #8
Workflow file for this run
This file contains hidden or 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: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| artifact-metadata: write | |
| attestations: write | |
| contents: write | |
| id-token: write | |
| jobs: | |
| Release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Setup Go | |
| uses: actions/setup-go@v7 | |
| with: | |
| go-version: stable | |
| - name: Build | |
| run: | | |
| mkdir package-linux-glibc-x86-64-v2 \ | |
| package-linux-glibc-x86-64-v3 \ | |
| package-linux-x86-64-v2 \ | |
| package-linux-x86-64-v3 \ | |
| package-linux-arm64 \ | |
| package-windows-x86-64-v2 \ | |
| package-windows-x86-64-v3 \ | |
| package-windows-arm64 \ | |
| package-macos-x86-64-v3 \ | |
| package-macos-arm64 \ | |
| env GOAMD64=v2 go build -v -trimpath -ldflags '-s -w' -o package-linux-glibc-x86-64-v2/ ./cmd/ddns-go | |
| env GOAMD64=v3 go build -v -trimpath -ldflags '-s -w' -o package-linux-glibc-x86-64-v3/ ./cmd/ddns-go | |
| env CGO_ENABLED=0 GOAMD64=v2 go build -v -trimpath -ldflags '-s -w' -o package-linux-x86-64-v2/ ./cmd/ddns-go | |
| env CGO_ENABLED=0 GOAMD64=v3 go build -v -trimpath -ldflags '-s -w' -o package-linux-x86-64-v3/ ./cmd/ddns-go | |
| env CGO_ENABLED=0 GOARCH=arm64 go build -v -trimpath -ldflags '-s -w' -o package-linux-arm64/ ./cmd/ddns-go | |
| env CGO_ENABLED=0 GOAMD64=v2 GOOS=windows go build -v -trimpath -ldflags '-s -w' -o package-windows-x86-64-v2/ ./cmd/ddns-go | |
| env CGO_ENABLED=0 GOAMD64=v3 GOOS=windows go build -v -trimpath -ldflags '-s -w' -o package-windows-x86-64-v3/ ./cmd/ddns-go | |
| env CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -v -trimpath -ldflags '-s -w' -o package-windows-arm64/ ./cmd/ddns-go | |
| env CGO_ENABLED=0 GOAMD64=v3 GOOS=darwin go build -v -trimpath -ldflags '-s -w' -o package-macos-x86-64-v3/ ./cmd/ddns-go | |
| env CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -v -trimpath -ldflags '-s -w' -o package-macos-arm64/ ./cmd/ddns-go | |
| - name: Package | |
| env: | |
| ZSTD_CLEVEL: 19 | |
| ZSTD_NBTHREADS: 0 | |
| run: | | |
| cd package-linux-glibc-x86-64-v2/ | |
| tar -acf ../ddns-go-${{ github.ref_name }}-linux-glibc-x86-64-v2.tar.zst . | |
| cd ../package-linux-glibc-x86-64-v3/ | |
| tar -acf ../ddns-go-${{ github.ref_name }}-linux-glibc-x86-64-v3.tar.zst . | |
| cd ../package-linux-x86-64-v2/ | |
| tar -acf ../ddns-go-${{ github.ref_name }}-linux-x86-64-v2.tar.zst . | |
| cd ../package-linux-x86-64-v3/ | |
| tar -acf ../ddns-go-${{ github.ref_name }}-linux-x86-64-v3.tar.zst . | |
| cd ../package-linux-arm64/ | |
| tar -acf ../ddns-go-${{ github.ref_name }}-linux-arm64.tar.zst . | |
| cd ../package-windows-x86-64-v2/ | |
| tar -acf ../ddns-go-${{ github.ref_name }}-windows-x86-64-v2.tar.zst . | |
| cd ../package-windows-x86-64-v3/ | |
| tar -acf ../ddns-go-${{ github.ref_name }}-windows-x86-64-v3.tar.zst . | |
| cd ../package-windows-arm64/ | |
| tar -acf ../ddns-go-${{ github.ref_name }}-windows-arm64.tar.zst . | |
| cd ../package-macos-x86-64-v3/ | |
| tar -acf ../ddns-go-${{ github.ref_name }}-macos-x86-64-v3.tar.zst . | |
| cd ../package-macos-arm64/ | |
| tar -acf ../ddns-go-${{ github.ref_name }}-macos-arm64.tar.zst . | |
| - name: Upload release assets | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: ddns-go-*.tar.zst | |
| tag: ${{ github.ref }} | |
| file_glob: true | |
| draft: true | |
| - name: Generate artifact attestation | |
| uses: actions/attest@v4 | |
| with: | |
| subject-path: 'ddns-go-*.tar.zst' |