Skip to content

Commit

Permalink
Refactor workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zw963 committed Jan 28, 2023
1 parent dbe9564 commit 259c586
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/alpine_x86_64_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ on:
push:
tags:
- "v*.*.*"

branches:
- master
jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -18,11 +19,11 @@ jobs:
- name: Download source
uses: actions/checkout@v2
- name: Install shards
run: shards check || shards install
- name: Check formatting
run: crystal tool format --check
- name: Run tests
run: crystal spec --order=random --error-on-warnings
run: shards check || shards install --without-development
# - name: Check formatting
# run: crystal tool format --check
# - name: Run tests
# run: crystal spec --order=random --error-on-warnings
- name: package information
run: |
echo "BINARY_NAME=myip" >> $GITHUB_ENV
Expand All @@ -31,10 +32,10 @@ jobs:
- name: release binary
id: release
run: |
shards build --production --release --progress --static --no-debug --link-flags="-s -Wl,-z,relro,-z,now"
shards build --production --release --progress --static --no-debug -Dstrict_multi_assign -Dno_number_autocast --link-flags="-s -Wl,-z,relro,-z,now,-L/app"
ASSERT_NAME=${BINARY_NAME}-${RELEASE_VERSION}-${PKG_ARCH}-unknown-linux-musl.tar.gz
tar zcf ${ASSERT_NAME} bin/${BINARY_NAME} LICENSE
echo ::set-output name=ASSERT_NAME::${ASSERT_NAME}
echo "{ASSERT_NAME}={$ASSERT_NAME}" >> $GITHUB_OUTPUT
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
branches:
- master
# - master
- main
workflow_call:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-msvc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
tags:
- "v*.*.*"
branches:
- master
# - master
- main

jobs:
Expand Down

0 comments on commit 259c586

Please sign in to comment.