Skip to content

Commit

Permalink
fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
BrightXiaoHan committed Aug 13, 2023
1 parent dde8120 commit 88204a3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
- v*
pull_request:
branches:
- release*
- main

jobs:
build-x86_64:
Expand All @@ -26,12 +26,12 @@ jobs:

- name: Pack
shell: bash
run: scripts/pack.sh
run: scripts/pack.sh home-cli-x86_64.tar

- uses: actions/upload-artifact@v3
with:
name: home-cli-pack-x86_64
path: home-cli.tar
path: home-cli-x86_64.tar

run-x86_64:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -66,12 +66,12 @@ jobs:

- name: Pack
shell: bash
run: scripts/pack.sh
run: scripts/pack.sh home-cli-arm64.tar

- uses: actions/upload-artifact@v3
with:
name: home-cli-pack-arm64
path: home-cli.tar
path: home-cli-arm64.tar

run-arm64:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -113,7 +113,6 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: home-cli-pack-x86_64
path: ./home-cli-x86_64.tar

- name: Upload Assets x86_64
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
Expand All @@ -129,7 +128,6 @@ jobs:
- uses: actions/download-artifact@v3
with:
name: home-cli-pack-arm64
path: ./home-cli-arm64.tar

- name: Upload Assets arm64
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
Expand Down
5 changes: 3 additions & 2 deletions scripts/pack.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
OUTPUT={$1:-homecli.tar.gz}
DIR=~/.cache/homecli

source $DIR/miniconda/bin/activate
Expand All @@ -7,11 +8,11 @@ CURDIR=$(pwd)
echo $CURDIR

cd $DIR
tar -cvf $CURDIR/home-cli.tar \
tar -cvf $CURDIR/$OUTPUT \
HOME bin miniconda.tar.gz nodejs > /dev/null
rm miniconda.tar.gz
cd -

cd ~/.local/share/
tar -rvf $CURDIR/home-cli.tar nvim/ > /dev/null
tar -rvf $CURDIR/$OUTPUT nvim/ > /dev/null
cd -

0 comments on commit 88204a3

Please sign in to comment.