Skip to content

chore: Update Rust workflow to rename the artifact file to ml2pdf.exe #9

chore: Update Rust workflow to rename the artifact file to ml2pdf.exe

chore: Update Rust workflow to rename the artifact file to ml2pdf.exe #9

Workflow file for this run

name: Rust Build and Publish
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Build the project
run: cargo build --release
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ml2pdf.exe
path: target/release/ml2pdf.exe
publish:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v2
with:
name: rust-app
path: target/release
- name: Publish release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.sha }}
release_name: Release ${{ github.sha }}
draft: false
prerelease: false
- name: Upload exe to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: target/release/ml2pdf.exe
asset_name: ml2pdf.exe
asset_content_type: application/octet-stream