chore: tagging 0.4.0 release #32
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- "*.*.*" | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v3 | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Build (Linux) | |
working-directory: seedelf-cli | |
run: cargo build --release | |
- name: Move Binary (Linux) | |
working-directory: seedelf-cli | |
run: mv target/release/seedelf-cli seedelf-cli | |
- name: Import GPG Key | |
run: | | |
echo "${{ secrets.RELEASE_GPG_KEY }}" | gpg --batch --yes --import | |
- name: Sign CLI Binary (Linux) | |
working-directory: seedelf-cli | |
run: | | |
gpg --batch --yes --pinentry-mode loopback \ | |
--passphrase "${{ secrets.GPG_PASSPHRASE }}" \ | |
--armor --detach-sign -o seedelf-cli.asc seedelf-cli | |
- name: Generate Binary Checksum (Linux) | |
working-directory: seedelf-cli | |
run: sha256sum seedelf-cli > seedelf-cli.sha256 | |
- name: Compress Binary and Checksum (Linux) | |
working-directory: seedelf-cli | |
run: tar -czvf seedelf-cli-linux.tar.gz seedelf-cli | |
- name: Sign Tar File (Linux) | |
working-directory: seedelf-cli | |
run: | | |
gpg --batch --yes --pinentry-mode loopback \ | |
--passphrase "${{ secrets.GPG_PASSPHRASE }}" \ | |
--armor --detach-sign -o seedelf-cli-linux.tar.gz.asc seedelf-cli-linux.tar.gz | |
- name: Generate Compressed File Checksum (Linux) | |
working-directory: seedelf-cli | |
run: sha256sum seedelf-cli-linux.tar.gz > seedelf-cli-linux.tar.gz.sha256 | |
- name: Create Unique Hashes File (Linux) | |
working-directory: seedelf-cli | |
run: | | |
echo "Linux Binary: $(cat seedelf-cli.sha256)" >> ../hashes-linux.txt | |
echo "Linux Compressed File: $(cat seedelf-cli-linux.tar.gz.sha256)" >> ../hashes-linux.txt | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: seedelf-cli-linux | |
path: | | |
seedelf-cli/seedelf-cli-linux.tar.gz | |
seedelf-cli/seedelf-cli-linux.tar.gz.asc | |
hashes-linux.txt | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v3 | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Build (Windows) | |
working-directory: seedelf-cli | |
run: cargo build --release --target x86_64-pc-windows-gnu | |
- name: Move Binary (Windows) | |
shell: pwsh | |
working-directory: seedelf-cli | |
run: mv target\x86_64-pc-windows-gnu\release\seedelf-cli.exe seedelf-cli.exe | |
- name: Import GPG Key | |
shell: pwsh | |
run: | | |
$keyFile = "gpg-key.asc" | |
# Write the multiline environment variable to a file | |
$env:RELEASE_GPG_KEY | Out-File -FilePath $keyFile -Encoding ascii | |
# Check if the file actually has content | |
Write-Host "Contents of $($keyFile):" | |
Get-Content $keyFile | |
# Import the key | |
gpg --batch --yes --import $keyFile | |
# Cleanup | |
Remove-Item $keyFile | |
env: | |
RELEASE_GPG_KEY: ${{ secrets.RELEASE_GPG_KEY }} | |
- name: Sign CLI Binary (Windows) | |
shell: pwsh | |
working-directory: seedelf-cli | |
run: | | |
gpg --batch --yes --pinentry-mode loopback ` | |
--passphrase "${{ secrets.GPG_PASSPHRASE }}" ` | |
--armor --detach-sign -o seedelf-cli.exe.asc seedelf-cli.exe | |
- name: Generate Binary Checksum (Windows) | |
shell: pwsh | |
working-directory: seedelf-cli | |
run: | | |
$hash = Get-FileHash seedelf-cli.exe -Algorithm SHA256 | |
$hash.Hash | Out-File -Encoding ASCII seedelf-cli.sha256 | |
- name: Compress Binary and Checksum (Windows) | |
shell: pwsh | |
working-directory: seedelf-cli | |
run: Compress-Archive -Path seedelf-cli.exe -DestinationPath seedelf-cli-windows.zip | |
- name: Sign Zip File (Windows) | |
shell: pwsh | |
working-directory: seedelf-cli | |
run: | | |
gpg --batch --yes --pinentry-mode loopback ` | |
--passphrase "${{ secrets.GPG_PASSPHRASE }}" ` | |
--armor --detach-sign -o seedelf-cli-windows.zip.asc seedelf-cli-windows.zip | |
- name: Generate Compressed File Checksum (Windows) | |
shell: pwsh | |
working-directory: seedelf-cli | |
run: | | |
$hash = Get-FileHash seedelf-cli-windows.zip -Algorithm SHA256 | |
$hash.Hash | Out-File -Encoding ASCII seedelf-cli-windows.zip.sha256 | |
- name: Create Unique Hashes File (Windows) | |
shell: pwsh | |
working-directory: seedelf-cli | |
run: | | |
echo "Windows Binary: $(Get-Content seedelf-cli.sha256)" >> ..\hashes-windows.txt | |
echo "Windows Compressed File: $(Get-Content seedelf-cli-windows.zip.sha256)" >> ..\hashes-windows.txt | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: seedelf-cli-windows | |
path: | | |
seedelf-cli/seedelf-cli-windows.zip | |
seedelf-cli/seedelf-cli-windows.zip.asc | |
hashes-windows.txt | |
build-mac: | |
runs-on: macos-latest | |
steps: | |
- name: Check out the code | |
uses: actions/checkout@v3 | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install x86_64-apple-darwin Target | |
run: rustup target add x86_64-apple-darwin | |
- name: Build (macOS) | |
working-directory: seedelf-cli | |
run: cargo build --release --target x86_64-apple-darwin | |
- name: Move Binary (macOS) | |
working-directory: seedelf-cli | |
run: mv target/x86_64-apple-darwin/release/seedelf-cli seedelf-cli | |
- name: Import GPG Key | |
run: | | |
echo "${{ secrets.RELEASE_GPG_KEY }}" | gpg --batch --yes --import | |
- name: Sign Binary (MacOs) | |
working-directory: seedelf-cli | |
run: | | |
gpg --batch --yes --pinentry-mode loopback \ | |
--passphrase "${{ secrets.GPG_PASSPHRASE }}" \ | |
--armor --detach-sign -o seedelf-cli.asc seedelf-cli | |
- name: Generate Binary Checksum (macOS) | |
working-directory: seedelf-cli | |
run: shasum -a 256 seedelf-cli > seedelf-cli.sha256 | |
- name: Compress Binary and Checksum (macOS) | |
working-directory: seedelf-cli | |
run: tar -czvf seedelf-cli-macos.tar.gz seedelf-cli | |
- name: Sign Tar File (MacOS) | |
working-directory: seedelf-cli | |
run: | | |
gpg --batch --yes --pinentry-mode loopback \ | |
--passphrase "${{ secrets.GPG_PASSPHRASE }}" \ | |
--armor --detach-sign -o seedelf-cli-macos.tar.gz.asc seedelf-cli-macos.tar.gz | |
- name: Generate Compressed File Checksum (macOS) | |
working-directory: seedelf-cli | |
run: shasum -a 256 seedelf-cli-macos.tar.gz > seedelf-cli-macos.tar.gz.sha256 | |
- name: Create Unique Hashes File (macOS) | |
working-directory: seedelf-cli | |
run: | | |
echo "macOS Binary: $(cat seedelf-cli.sha256)" >> ../hashes-macos.txt | |
echo "macOS Compressed File: $(cat seedelf-cli-macos.tar.gz.sha256)" >> ../hashes-macos.txt | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: seedelf-cli-macos | |
path: | | |
seedelf-cli/seedelf-cli-macos.tar.gz | |
seedelf-cli/seedelf-cli-macos.tar.gz.asc | |
hashes-macos.txt | |
finalize-release: | |
runs-on: ubuntu-latest | |
needs: | |
- build-linux | |
- build-windows | |
- build-mac | |
steps: | |
- name: Download Linux Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: seedelf-cli-linux | |
path: . | |
- name: Download Windows Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: seedelf-cli-windows | |
path: . | |
- name: Download MacOS Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: seedelf-cli-macos | |
path: . | |
- name: Combine Hashes into All-Hashes | |
run: cat hashes-linux.txt hashes-windows.txt hashes-macos.txt > hashes.txt | |
- name: Import GPG Key | |
run: | | |
echo "${{ secrets.RELEASE_GPG_KEY }}" | gpg --batch --yes --import | |
- name: Sign Hashes File (Linux) | |
run: | | |
gpg --batch --yes --pinentry-mode loopback \ | |
--passphrase "${{ secrets.GPG_PASSPHRASE }}" \ | |
--armor --detach-sign -o hashes.txt.asc hashes.txt | |
- name: Create GitHub Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ${{ github.ref_name }} | |
draft: true | |
body: | | |
### New Release: ${{ github.ref_name }} | |
This release includes binaries and checksums for Linux, Windows, and macOS. | |
Get the [release key here](https://github.com/logical-mechanism/Seedelf-Wallet/blob/main/util/pubkeys/seedelfwallet.asc). | |
Thank you for using `seedelf-cli`. | |
If you encounter any issues, please report them [here](https://github.com/logical-mechanism/Seedelf-Wallet/issues). | |
generate_release_notes: true | |
files: | | |
seedelf-cli/seedelf-cli-linux.tar.gz | |
seedelf-cli/seedelf-cli-linux.tar.gz.asc | |
seedelf-cli/seedelf-cli-windows.zip | |
seedelf-cli/seedelf-cli-windows.zip.asc | |
seedelf-cli/seedelf-cli-macos.tar.gz | |
seedelf-cli/seedelf-cli-macos.tar.gz.asc | |
hashes.txt | |
hashes.txt.asc | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |