Skip to content

Commit 4a7e57d

Browse files
ci(rssgen): 🐛 fix an item with the specified name D:\a\rssgen\rssgen\target\package already exists.
1 parent aead474 commit 4a7e57d

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

.github/workflows/release.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,23 @@ jobs:
5454
run: cargo build --verbose --release --target ${{ matrix.target }}
5555
- name: Package
5656
run: |
57-
mkdir -p target/package
57+
if [ ! -d "target/package" ]; then
58+
mkdir -p target/package
59+
fi
5860
cd target/${{ matrix.target }}/release
5961
tar czf ../../package/${{ matrix.target }}.tar.gz *
62+
shell: bash
63+
64+
- name: Package (Windows)
65+
if: matrix.os == 'windows-latest'
66+
run: |
67+
if (!(Test-Path "target/package")) {
68+
mkdir target/package
69+
}
70+
cd target/${{ matrix.target }}/release
71+
tar -czf ../../package/${{ matrix.target }}.tar.gz *
72+
shell: pwsh
73+
6074
- uses: actions/upload-artifact@v4
6175
with:
6276
name: ${{ matrix.target }}
@@ -70,7 +84,7 @@ jobs:
7084
steps:
7185
- uses: actions/checkout@v4
7286
- name: Set version
73-
run: echo "VERSION=$(grep version Cargo.toml | sed -n 2p | cut -d '"' -f 2)" >> $GITHUB_ENV
87+
run: echo "VERSION=$(grep -m 1 '^version =' Cargo.toml | cut -d '"' -f 2)" >> $GITHUB_ENV
7488
- uses: actions/download-artifact@v4
7589
with:
7690
path: artifacts

0 commit comments

Comments
 (0)