Skip to content

Merge pull request #26 from G-Core/fix/releases #27

Merge pull request #26 from G-Core/fix/releases

Merge pull request #26 from G-Core/fix/releases #27

Workflow file for this run

name: Continuous Delivery
permissions:
pull-requests: write
contents: write
on:
push:
branches:
- 'main'
env:
CARGO_TERM_COLOR: always
jobs:
create-tag:
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Get package tag
run: |
cargo install cargo-get
echo "TAG=v`cargo get package.version`" >> $GITHUB_ENV
echo "tag name ${{ env.TAG }}"
- name: Create tag
uses: rickstaa/action-create-tag@v1
with:
tag: ${{ env.TAG }}
tag_exists_error: true
message: "Latest release"
build-and-upload:
name: Build and upload
needs: create-tag
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
steps:
- name: Clone repo
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
target: wasm32-wasi
components: rustfmt, clippy
- name: Cache dependencies
uses: Swatinem/rust-cache@v2.2.1
- name: Release build
run: cargo build --release
- name: Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TAG }}
files: |
${{ env.ASSET }}