Skip to content

Commit 907290e

Browse files
committed
fix: release workflow
1 parent 8f2a934 commit 907290e

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -74,39 +74,40 @@ jobs:
7474
- name: Set target variables
7575
shell: bash
7676
run: |
77-
echo "TARGET_FLAGS=--target ${{ matrix.target }}/release" >> $GITHUB_ENV
78-
echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV
77+
echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV
78+
echo "TARGET_DIR=./target/${{ matrix.target }}/release" >> $GITHUB_ENV
7979
8080
- name: Show command used for Cargo
8181
shell: bash
8282
run: |
83-
echo "cargo command is: ${{ env.CARGO }}"
8483
echo "target flag is: ${{ env.TARGET_FLAGS }}"
8584
echo "target dir is: ${{ env.TARGET_DIR }}"
8685
8786
- name: Build release binary
8887
shell: bash
8988
run: |
9089
cargo build --verbose --release ${{ env.TARGET_FLAGS }}
91-
bin="target/${{ matrix.target }}/stats_provider"
90+
bin="${{ env.TARGET_DIR }}/stats_provider"
9291
echo "BIN=$bin" >> $GITHUB_ENV
9392
9493
- name: Strip release binary (macos)
9594
if: matrix.os == 'macos-latest'
9695
shell: bash
9796
run: strip "$BIN"
9897

99-
- name: Copy README and LICENSE to target directory
100-
shell: bash
101-
run: |
102-
cp README.md LICENSE "${{ env.TARGET_DIR }}/"
103-
10498
- name: Determine archive name
10599
shell: bash
106100
run: |
107101
version="${{ needs.create-release.outputs.version }}"
108102
echo "ARCHIVE=stats_provider-$version-${{ matrix.target }}" >> $GITHUB_ENV
109103
104+
- name: Creating directory for archive
105+
shell: bash
106+
run: |
107+
mkdir -p "$ARCHIVE"
108+
cp "$BIN" "$ARCHIVE"/
109+
cp {README.md,LICENSE} "$ARCHIVE"/
110+
110111
- name: Build archive
111112
shell: bash
112113
run: |

0 commit comments

Comments
 (0)