Fix release packaging.

This commit is contained in:
Blaž Hrastnik 2021-05-11 19:46:58 +09:00
parent f6d0c7a995
commit e1dc1d2d48
3 changed files with 46 additions and 31 deletions

View File

@ -86,49 +86,31 @@ jobs:
aarch64-linux-gnu-strip \ aarch64-linux-gnu-strip \
/target/${{ matrix.target }}/release/hx /target/${{ matrix.target }}/release/hx
- name: Calculate tag name
run: |
name=dev
if [[ $GITHUB_REF == refs/tags/v* ]]; then
name=${GITHUB_REF:10}
fi
echo ::set-output name=val::$name
echo TAG=$name >> $GITHUB_ENV
id: tagname
- name: Build archive - name: Build archive
shell: bash shell: bash
run: | run: |
# outdir="$(ci/cargo-out-dir "${{ env.TARGET_DIR }}")" mkdir dist
staging="helix-${{ env.RELEASE_VERSION }}-${{ matrix.target }}"
mkdir "$staging"
cp {README.md,LICENSE} "$staging/"
# cp {CHANGELOG.md,FAQ.md,GUIDE.md} "$staging/doc/"
# cp "$outdir"/{hx.bash,hx.fish,_hx.ps1} "$staging/complete/"
# cp complete/_hx "$staging/complete/"
if [ "${{ matrix.os }}" = "windows-2019" ]; then if [ "${{ matrix.os }}" = "windows-2019" ]; then
cp "target/${{ matrix.target }}/release/hx.exe" "$staging/" cp "target/${{ matrix.target }}/release/hx.exe" "dist/"
7z a "$staging.zip" "$staging"
echo "ASSET=$staging.zip" >> $GITHUB_ENV
else else
# The man page is only generated on Unix systems. ¯\_(ツ)_/¯ cp "target/${{ matrix.target }}/release/hx" "dist/"
# cp "$outdir"/hx.1 "$staging/doc/"
cp "target/${{ matrix.target }}/release/hx" "$staging/"
tar czf "$staging.tar.gz" "$staging"
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
fi fi
# package
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
with: with:
name: tarballs-${{ matrix.build }} name: bins-${{ matrix.build }}
path: ${{ env.ASSET }} path: dist
publish: publish:
name: Publish name: Publish
needs: [dist] needs: [dist]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
submodules: false
- uses: actions/download-artifact@v2 - uses: actions/download-artifact@v2
with: with:
path: dist path: dist
@ -144,11 +126,39 @@ jobs:
echo TAG=$name >> $GITHUB_ENV echo TAG=$name >> $GITHUB_ENV
id: tagname id: tagname
- name: Build archive
shell: bash
run: |
set -euxo pipefail
rm -rf tmp
mkdir tmp
mkdir dist
for dir in bins-* ; do
platform=${dir#"bins-"}
if [[ $platform =~ "windows" ]]; then
exe=".exe"
fi
pkgname=helix-$TAG-$platform
mkdir tmp/$pkgname
cp LICENSE README.md tmp/$pkgname
cp -r runtime tmp/$pkgname/
mv bins-$platform/hx$exe tmp/$pkgname
chmod +x tmp/$pkgname/hx$exe
if [ "$exe" = "" ]; then
tar cJf dist/$pkgname.tar.xz -C tmp $pkgname
else
(cd tmp && 7z a -r ../dist/$pkgname.zip $pkgname)
fi
done
- name: Upload binaries to release - name: Upload binaries to release
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/**/* file: dist/*
file_glob: true file_glob: true
tag: ${{ steps.tagname.outputs.val }} tag: ${{ steps.tagname.outputs.val }}
overwrite: true overwrite: true

View File

@ -1,10 +1,15 @@
# Helix # Helix
[![Build status](https://github.com/helix-editor/helix/workflows/ci/badge.svg)](https://github.com/helix-editor/helix/actions)
A kakoune / neovim inspired editor, written in Rust. A kakoune / neovim inspired editor, written in Rust.
The editing model is very heavily based on kakoune; during development I found The editing model is very heavily based on kakoune; during development I found
myself agreeing with most of kakoune's design decisions. myself agreeing with most of kakoune's design decisions.
For more information, see the [website](https://helix-editor.com).
# Features # Features
- Vim-like modal editing - Vim-like modal editing
@ -40,7 +45,7 @@ # Contributing
- You can look at the [good first issue](https://github.com/helix-editor/helix/labels/good%20first%20issue) label on the issue tracker. - You can look at the [good first issue](https://github.com/helix-editor/helix/labels/good%20first%20issue) label on the issue tracker.
- Help with packaging on various distributions needed! - Help with packaging on various distributions needed!
- If your preffered language is missing, integrating a tree-sitter grammar for - If your preferred language is missing, integrating a tree-sitter grammar for
it and defining syntax highlight queries for it is straight forward and it and defining syntax highlight queries for it is straight forward and
doesn't require much knowledge of the internals. doesn't require much knowledge of the internals.
@ -49,5 +54,5 @@ # Contributing
# Getting help # Getting help
Discuss the project on the community [Matrix channel](https://matrix.to/#/#helix-editor:example.com). Discuss the project on the community [Matrix channel](https://matrix.to/#/#helix-editor:matrix.org).