diff --git a/.github/workflows/nightly-docker.yml b/.github/workflows/nightly-docker.yml deleted file mode 100644 index 88178fd1..00000000 --- a/.github/workflows/nightly-docker.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: 打包最新版为 Docker Image - -on: [push] -jobs: - docker-builder: - name: build docker - runs-on: ubuntu-23.04 - steps: - - name: Check out code into the Go module directory - uses: actions/checkout@master - - run: sudo apt-get install -y qemu-user-static - - - name: Set up nix - uses: cachix/install-nix-action@v27 - with: - nix_path: nixpkgs=channel:nixos-unstable - extra_nix_config: | - sandbox = true - - - name: Speed Up nix - uses: DeterminateSystems/magic-nix-cache-action@main - - - name: build docker - run: | - mkdir output/ - - # https://discourse.nixos.org/t/nix-github-actions-aarch64/11034 - nix build .#packages.aarch64-linux.docker_builder -o aarch64-linux.docker --print-out-paths --option system aarch64-linux --extra-platforms aarch64-linux - cp $(readlink aarch64-linux.docker) ./output/aarch64-linux.docker.tar.gz - - nix build .#packages.x86_64-linux.docker_builder -o x86_64-linux.docker --print-out-paths --option system x86_64-linux --extra-platforms x86_64-linux - cp $(readlink x86_64-linux.docker) ./output/x86_64-linux.docker.tar.gz - - # gomod2nix did not provide this - # nix build .#packages.i686-linux.docker_builder -o i686-linux.docker --print-out-paths --option system i686-linux --extra-platforms i686-linux - # cp $(readlink i686-linux.docker) ./output/i686-linux.docker.tar.gz - - - name: Upload artifact - uses: actions/upload-artifact@master - if: ${{ !github.head_ref }} - with: - path: output/ diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 6aeb95c5..65553d5d 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -6,7 +6,7 @@ env: BINARY_PREFIX: "zbp_" BINARY_SUFFIX: "" PR_PROMPT: "::warning:: Build artifact will not be uploaded due to the workflow is trigged by pull request." - LD_FLAGS: "-w -s" + LD_FLAGS: "-w -s -checklinkname=0" jobs: build: @@ -45,6 +45,7 @@ jobs: GOARCH: ${{ matrix.goarch }} IS_PR: ${{ !!github.head_ref }} run: | + if [ ! -f custom/register.go ]; then touch custom/register.go; fi go generate ./... if [ $GOOS = "windows" ]; then export BINARY_SUFFIX="$BINARY_SUFFIX.exe"; fi if $IS_PR ; then echo $PR_PROMPT; fi diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index 745ad103..3ab04693 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -36,6 +36,7 @@ jobs: - name: Tidy Modules run: | go mod tidy + if [ ! -f custom/register.go ]; then touch custom/register.go; fi go generate ./... - name: golangci-lint diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 53a2db25..f5e9f7f6 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -16,6 +16,7 @@ jobs: - name: Tidy Modules run: | go mod tidy + if [ ! -f custom/register.go ]; then touch custom/register.go; fi go generate ./... - name: Run Lint diff --git a/.goreleaser.yml b/.goreleaser.yml index b94d115c..039208fe 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -4,6 +4,7 @@ env: before: hooks: - go mod tidy + - if [ ! -f custom/register.go ]; then touch custom/register.go; fi - go generate ./... - go install github.com/tc-hib/go-winres@latest - go-winres make @@ -26,7 +27,7 @@ builds: flags: - -trimpath ldflags: - - -s -w + - -s -w -checklinkname=0 - id: win env: - CGO_ENABLED=0