@@ -86,49 +86,31 @@ jobs:
86 aarch64-linux-gnu-strip \
86 aarch64-linux-gnu-strip \
87 /target/${{ matrix.target }}/release/hx
87 /target/${{ matrix.target }}/release/hx
89− - name: Calculate tag name
92− if [[ $GITHUB_REF == refs/tags/v* ]]; then
93− name=${GITHUB_REF:10}
95− echo ::set-output name=val::$name
96− echo TAG=$name >> $GITHUB_ENV
99 - name: Build archive
89 - name: Build archive
100 shell: bash
90 shell: bash
102− # outdir="$(ci/cargo-out-dir "${{ env.TARGET_DIR }}")"
103− staging="helix-${{ env.RELEASE_VERSION }}-${{ matrix.target }}"
104− mkdir "$staging"
92+ mkdir dist
105− cp {README.md,LICENSE} "$staging/"
106− # cp {CHANGELOG.md,FAQ.md,GUIDE.md} "$staging/doc/"
107− # cp "$outdir"/{hx.bash,hx.fish,_hx.ps1} "$staging/complete/"
108− # cp complete/_hx "$staging/complete/"
109 if [ "${{ matrix.os }}" = "windows-2019" ]; then
93 if [ "${{ matrix.os }}" = "windows-2019" ]; then
110− cp "target/${{ matrix.target }}/release/hx.exe" "$staging/"
94+ cp "target/${{ matrix.target }}/release/hx.exe" "dist/"
111− 7z a "$staging.zip" "$staging"
112− echo "ASSET=$staging.zip" >> $GITHUB_ENV
114− # The man page is only generated on Unix systems. ¯\_(ツ)_/¯
115− # cp "$outdir"/hx.1 "$staging/doc/"
116− cp "target/${{ matrix.target }}/release/hx" "$staging/"
96+ cp "target/${{ matrix.target }}/release/hx" "dist/"
117− tar czf "$staging.tar.gz" "$staging"
118− echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
122 - uses: actions/upload-artifact@v1
99 - uses: actions/upload-artifact@v1
124− name: tarballs-${{ matrix.build }}
101+ name: bins-${{ matrix.build }}
125− path: ${{ env.ASSET }}
102+ path: dist
128 name: Publish
105 name: Publish
129 needs: [dist]
106 needs: [dist]
130 runs-on: ubuntu-latest
107 runs-on: ubuntu-latest
109+ - name: Checkout sources
110+ uses: actions/checkout@v2
132 - uses: actions/download-artifact@v2
114 - uses: actions/download-artifact@v2
134 path: dist
116 path: dist
@@ -144,11 +126,39 @@ jobs:
144 echo TAG=$name >> $GITHUB_ENV
126 echo TAG=$name >> $GITHUB_ENV
145 id: tagname
127 id: tagname
129+ - name: Build archive
138+ for dir in bins-* ; do
139+ platform=${dir#"bins-"}
140+ if [[ $platform =~ "windows" ]]; then
143+ pkgname=helix-$TAG-$platform
145+ cp LICENSE README.md tmp/$pkgname
146+ cp -r runtime tmp/$pkgname/
147+ mv bins-$platform/hx$exe tmp/$pkgname
148+ chmod +x tmp/$pkgname/hx$exe
150+ if [ "$exe" = "" ]; then
151+ tar cJf dist/$pkgname.tar.xz -C tmp $pkgname
153+ (cd tmp && 7z a -r ../dist/$pkgname.zip $pkgname)
147 - name: Upload binaries to release
157 - name: Upload binaries to release
148 uses: svenstaro/upload-release-action@v2
158 uses: svenstaro/upload-release-action@v2
150 repo_token: ${{ secrets.GITHUB_TOKEN }}
160 repo_token: ${{ secrets.GITHUB_TOKEN }}
151− file: dist/**/*
161+ file: dist/*
152 file_glob: true
162 file_glob: true
153 tag: ${{ steps.tagname.outputs.val }}
163 tag: ${{ steps.tagname.outputs.val }}
154 overwrite: true
164 overwrite: true