Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CI #233

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 25 additions & 12 deletions .github/workflows/wallet_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ jobs:
compiler: cargo
target: windows-x64

steps:
outputs:
semver: ${{ steps.semver_output.outputs.SEMVER }}

steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
Expand All @@ -63,25 +65,36 @@ jobs:
run: ${{matrix.compiler}} b --release --verbose ${{matrix.flags}}

- name: Get semver from wallet binary
id: semver_output
run: |
ls -la target/release
export SEMVER=$(cargo pkgid | perl -lpe 's/.*\@(.*)/$1/')
echo "SEMVER=$SEMVER" >> $GITHUB_ENV
echo "SEMVER=$SEMVER" >> $GITHUB_OUTPUT

- name: "Pack binaries"
run: |
mkdir rusk-wallet${{env.SEMVER}}-${{matrix.target}}
echo "Fetching changelog and readme files..."
mv target/${{matrix.platform}}/release/rusk-wallet rusk-wallet${{env.SEMVER}}-${{matrix.target}}
cp CHANGELOG.md rusk-wallet${{env.SEMVER}}-${{matrix.target}}
cp README.md rusk-wallet${{env.SEMVER}}-${{matrix.target}}
tar -czvf ruskwallet${{env.SEMVER}}-${{matrix.target}}.tar.gz rusk-wallet${{env.SEMVER}}-${{matrix.target}}
mkdir -p ./${{env.SEMVER}}-${{matrix.target}}
echo "Fetching binary, changelog, and readme files..."
mv target/${{matrix.platform}}/release/rusk-wallet ./${{env.SEMVER}}-${{matrix.target}}/rusk-wallet
cp CHANGELOG.md ./${{env.SEMVER}}-${{matrix.target}}/
cp README.md ./${{env.SEMVER}}-${{matrix.target}}/
tar -czvf ruskwallet${{env.SEMVER}}-${{matrix.target}}.tar.gz ./${{env.SEMVER}}-${{matrix.target}}
ls -la *.gz

- name: "Upload Wallet Artifacts"
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: rusk-wallet-${{env.SEMVER}}-${{matrix.target}}
path: ./*.gz
retention-days: 5

merge:
runs-on: ubuntu-latest
needs: build_and_publish
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: wallet-binaries-${{env.SEMVER}}
path: |
./*.gz
retention-days: 5
name: wallet-binaries-${{needs.build_and_publish.outputs.SEMVER}}
pattern: rusk-wallet-*