Skip to content

Commit

Permalink
fix(devops):#30 fixed build-zwallet.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
cnlangzi committed Aug 10, 2021
1 parent 35d51aa commit c5c3edb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 92 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: build-cli
name: build-zwallet
on:
push:
branches:
- master
- dev
- feat/build-cli
tags:
- 'v*.*.*'

Expand All @@ -30,13 +29,13 @@ jobs:
elif [[ "${{github.base_ref}}" == "dev" || "${{github.ref}}" == "refs/heads/dev" ]]; then
echo "TAG=v0.0.0-dev" >> $GITHUB_ENV
else
echo "TAG=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//-/g' )" >> $GITHUB_ENV
echo "TAG=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
fi
- name: Install
run: make install

- name: zip release
- name: Zip release
run: tar -czvf zwallet-linux.tar.gz ./zwallet

- name: Upload binaries to release
Expand All @@ -61,23 +60,22 @@ jobs:

- name: Checkout
uses: actions/checkout@v2

- name: Set GITHUB_ENV
run: |
echo "BRANCH=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_ENV
if [[ "${{github.base_ref}}" == "master" || "${{github.ref}}" == "refs/heads/master" ]]; then
echo "TAG=v0.0.0-master" >> $GITHUB_ENV
elif [[ "${{github.base_ref}}" == "dev" || "${{github.ref}}" == "refs/heads/dev" ]]; then
echo "TAG=v0.0.0-dev" >> $GITHUB_ENV
else
echo "TAG=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//-/g' )" >> $GITHUB_ENV
fi
IF ( "${{github.base_ref}}" -eq "master" -OR "${{github.ref}}" -eq "refs/heads/master" ){
echo "TAG=v0.0.0-master" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
} ElseIf ( "${{github.base_ref}}" -eq "dev" -OR "${{github.ref}}" -eq "refs/heads/dev" ){
echo "TAG=v0.0.0-dev" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
} ELSE {
echo "TAG=${{github.ref}}" | %{$_ -replace('refs/tags/', '')} | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
}

- name: Install
run: make install

- name: zip release
- name: Zip release
run: |
copy zwallet zwallet.exe
7z a zwallet-windows.zip zwallet.exe
Expand Down Expand Up @@ -114,12 +112,12 @@ jobs:
elif [[ "${{github.base_ref}}" == "dev" || "${{github.ref}}" == "refs/heads/dev" ]]; then
echo "TAG=v0.0.0-dev" >> $GITHUB_ENV
else
echo "TAG=$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//-/g' )" >> $GITHUB_ENV
echo "TAG=$(echo ${GITHUB_REF#refs/tags/})" >> $GITHUB_ENV
fi
- name: Install
run: make install
- name: zip release
- name: Zip release
run: tar -czvf zwallet-macos.tar.gz ./zwallet

- name: Upload binaries to release
Expand Down
74 changes: 0 additions & 74 deletions .github/workflows/build-zwalletcli.yml

This file was deleted.

0 comments on commit c5c3edb

Please sign in to comment.