Skip to content

Commit

Permalink
Set package name correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
zw963 committed May 22, 2022
1 parent fe8036e commit ea992d8
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,21 @@ jobs:
run: crystal tool format --check
- name: Run tests
run: crystal spec
- name: package information
id: pkg_information
run: |
echo "DPKG_NAME=$(sed -n 's/^name: \(.*\)/\1/p' shard.yml |head -n1)" >> $GITHUB_ENV
echo "DPKG_ARCH=amd64" >> $GITHUB_ENV
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo ::set-output name=ASSERT_NAME::ASSERT_NAME=${DPKG_NAME}-${RELEASE_VERSION}-${KPKG_ARCH}-unknown-linux-musl.tar.gz
- name: release binary
run: |
shards build --production --release --static --no-debug --link-flags="-s -Wl,-z,relro,-z,now"
strip ./bin/crystal_hello_world
tar zcf crystal_hello_world.tar.gz bin/crystal_hello_world LICENSE
strip ./bin/${DPKG_NAME}
tar zcf ${{ steps.pkg_information.outputs.ASSERT_NAME }} bin/${DPKG_NAME} LICENSE
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
crystal_hello_world.tar.gz
${{ steps.pkg_information.outputs.ASSERT_NAME }}

0 comments on commit ea992d8

Please sign in to comment.