Skip to content

Commit 9a28a81

Browse files
committed
Move archive to main directory before publishing
1 parent 11631f4 commit 9a28a81

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

.github/workflows/release.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -89,36 +89,36 @@ jobs:
8989
- name: Set up Rust
9090
uses: hecrj/setup-rust-action@v1
9191
- uses: actions/checkout@master
92+
- name: Set version
93+
id: set_version
94+
run: echo ::set-output name=WUTAG_VERSION::${GITHUB_REF/refs\/tags\//}
95+
- name: Set archive name
96+
id: set_name
97+
run: echo ::set-output name=WUTAG_ARCHIVE::wutag-${{steps.set_version.outputs.WUTAG_VERSION}}-${{ matrix.target}}
9298
- run: cargo build --release
9399
- run: |
94100
mkdir release
95101
mv target/release/wutag release/
96102
- working-directory: ./release
103+
name: Create archives
97104
run: |
98-
tar -zcvf wutag-${{ matrix.target }}.tar.gz .
99-
tar -Jcvf wutag-${{ matrix.target }}.tar.xz .
100-
101-
- name: Get the version
102-
id: get_version
103-
run: echo ::set-output name=WUTAG_VERSION::${GITHUB_REF/refs\/tags\//}
104-
- name: Set archive name
105-
id: set_name
106-
run: echo ::set-output name=WUTAG_ARCHIVE::wutag-${{steps.get_version.outputs.WUTAG_VERSION}}-${{ matrix.target}}
105+
tar -zcvf ../${{ steps.set_name.outputs.WUTAG_ARCHIVE }}.tar.gz .
106+
tar -Jcvf ../${{ steps.set_name.outputs.WUTAG_ARCHIVE }}.tar.xz .
107107
- name: Upload gz
108108
uses: svenstaro/upload-release-action@v2
109109
with:
110110
repo_name: wojciechkepka/wutag
111111
repo_token: ${{ secrets.GITHUB_TOKEN }}
112-
file: release/${{ steps.set_name.outputs.WUTAG_ARCHIVE }}.tar.gz
112+
file: ${{ steps.set_name.outputs.WUTAG_ARCHIVE }}.tar.gz
113113
asset_name: ${{ steps.set_name.outputs.WUTAG_ARCHIVE }}.tar.gz
114-
tag: ${{ steps.get_version.outputs.WUTAG_VERSION }}
114+
tag: ${{ steps.set_version.outputs.WUTAG_VERSION }}
115115
overwrite: true
116116
- name: Upload xz
117117
uses: svenstaro/upload-release-action@v2
118118
with:
119119
repo_name: wojciechkepka/wutag
120120
repo_token: ${{ secrets.GITHUB_TOKEN }}
121-
file: release/${{ steps.set_name.outputs.WUTAG_ARCHIVE }}.tar.xz
121+
file: ${{ steps.set_name.outputs.WUTAG_ARCHIVE }}.tar.xz
122122
asset_name: ${{ steps.set_name.outputs.WUTAG_ARCHIVE }}.tar.xz
123-
tag: ${{ steps.get_version.outputs.WUTAG_VERSION }}
123+
tag: ${{ steps.set_version.outputs.WUTAG_VERSION }}
124124
overwrite: true

0 commit comments

Comments
 (0)