Skip to content

fix toolchain not installed 🛠️ #4

fix toolchain not installed 🛠️

fix toolchain not installed 🛠️ #4

Workflow file for this run

name: Build and Release
on:
push:
branches: [master] # Trigger only on pushes to the main branch
jobs:
build-and-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
components: rustfmt, clippy
override: true
- name: Extract version from Cargo.toml
id: extract_version
run: echo ::set-output name=version::$(grep -oP '^version\s*=\s*"\K[^"]+' Cargo.toml)
- name: Get latest release version
id: get_latest_release
uses: octokit/request-action@v2.x
with:
route: GET /repos/${{ github.repository }}/releases/latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build binaries
if: ${{ steps.extract_version.outputs.version != steps.get_latest_release.outputs.data.tag_name }}
run: |
rustup target add x86_64-pc-windows-gnu
cargo build --release --target x86_64-pc-windows-gnu
cargo build --release --target x86_64-unknown-linux-gnu
- name: Create release
if: ${{ steps.extract_version.outputs.version != steps.get_latest_release.outputs.data.tag_name }}
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.extract_version.outputs.version }}
release_name: Release ${{ steps.extract_version.outputs.version }}
body: |
## Changes
## Downloads
- **Windows binary:** [link to Windows binary]
- **Linux binary:** [link to Linux binary]
draft: false
prerelease: false