Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
zw963 committed Feb 14, 2023
1 parent e859989 commit e227966
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/apple_darwin_release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
# push:
# tags:
# - "v*.*.*"
push:
tags:
- "v*.*.*"

jobs:
build:
Expand All @@ -18,7 +18,7 @@ jobs:
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
- name: Install shards
run: shards check || shards install
run: shards check || shards install --without-development
- name: Check formatting
run: crystal tool format --check
- name: Run tests
Expand All @@ -28,13 +28,16 @@ jobs:
echo "BINARY_NAME=myip" >> $GITHUB_ENV
echo "PKG_ARCH=x86_64" >> $GITHUB_ENV
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
echo "PLATFORM=apple-darwin.tar.gz" >> $GITHUB_ENV
- name: set asset name
run: |
echo "ASSERT_NAME=${BINARY_NAME}-${RELEASE_VERSION}-${PKG_ARCH}-${PLATFORM}" >> $GITHUB_ENV
- name: release binary
id: release
run: |
shards build --production --release --progress --no-debug
ASSERT_NAME=${BINARY_NAME}-${RELEASE_VERSION}-${PKG_ARCH}-apple-darwin.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
6 changes: 3 additions & 3 deletions .github/workflows/gnu_x86_64_release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
# push:
# tags:
# - "v*.*.*"
push:
tags:
- "v*.*.*"

jobs:
call-ci:
Expand Down

0 comments on commit e227966

Please sign in to comment.