Skip to content

Commit cd24865

Browse files
author
Brean
committed
Please just workflow
1 parent 1bcdffc commit cd24865

1 file changed

Lines changed: 37 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
toolchain: stable
2525
override: true
26-
target: aarch64-unknown-linux-musl # Add the cross-compilation target
26+
target: aarch64-unknown-linux-musl
2727

2828
- name: Cache Cargo registry & index
2929
uses: actions/cache@v3
@@ -32,11 +32,46 @@ jobs:
3232
~/.cargo/registry
3333
~/.cargo/git
3434
key: cargo-${{ hashFiles('**/Cargo.lock') }}
35+
36+
# Install additional required targets
37+
- name: Add x86_64 GNU target
38+
run: rustup target add x86_64-unknown-linux-gnu
39+
40+
# Update .goreleaser.yml to use pure Rust builder
41+
- name: Update goreleaser config
42+
run: |
43+
cat > .goreleaser.yml << 'EOF'
44+
version: 2
45+
project_name: node-cleaner
46+
47+
builds:
48+
- id: rust-build
49+
builder: rust
50+
dir: .
51+
binary: node-cleaner
52+
targets:
53+
- x86_64-unknown-linux-gnu
54+
- aarch64-unknown-linux-musl
55+
flags:
56+
- --release
57+
58+
archives:
59+
- id: default
60+
ids:
61+
- rust-build
62+
formats:
63+
- tar.gz
64+
- zip
65+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
66+
files:
67+
- README.md
68+
- LICENSE
69+
EOF
3570
3671
- name: Install GoReleaser
3772
uses: goreleaser/goreleaser-action@v2
3873
with:
3974
version: latest
40-
args: release --clean # Updated from --rm-dist to --clean
75+
args: release --clean
4176
env:
4277
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)