Upgrade Ubuntu to 24.04 #8
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: Build Release Artifacts | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
build-binary: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Configure rustc version | |
run: | | |
# use the version defined in gluwa/creditcoin3 | |
RUSTC_VERSION=$(curl --silent https://raw.githubusercontent.com/gluwa/creditcoin3/dev/rust-toolchain.toml | grep channel | tail -n1 | tr -d " " | cut -f2 -d'"') | |
echo "RUSTC_VERSION=$RUSTC_VERSION" >> "$GITHUB_ENV" | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ env.RUSTC_VERSION }} | |
profile: minimal | |
override: true | |
- name: Figure out tag name | |
shell: bash | |
run: | | |
TAG_NAME=$(git describe --tag) | |
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV | |
- name: DEBUG | |
shell: bash | |
run: | | |
echo "Tag is '${{ env.TAG_NAME }}'" | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Upload binary | |
uses: actions/upload-artifact@v3 | |
with: | |
path: 'target/release/creditcoin-fork' | |
if-no-files-found: error | |
create-release: | |
runs-on: ubuntu-24.04 | |
needs: | |
- build-binary | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Figure out tag name | |
shell: bash | |
run: | | |
TAG_NAME=$(git describe --tag) | |
echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV | |
- name: Download binaries | |
uses: actions/download-artifact@v3 | |
- name: DEBUG | |
shell: bash | |
run: | | |
ls -lR | |
- name: Make the release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: 'artifact/creditcoin-*' | |
fail_on_unmatched_files: true | |
name: ${{ env.TAG_NAME }} |