mirror of
https://github.com/house-of-vanity/mus-fuse.git
synced 2025-08-21 16:17:15 +00:00
Update build.yml
This commit is contained in:
62
.github/workflows/build.yml
vendored
62
.github/workflows/build.yml
vendored
@@ -1,37 +1,39 @@
|
|||||||
name: Rust
|
name: Build and publish
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
# Sequence of patterns matched against refs/tags
|
||||||
pull_request:
|
tags:
|
||||||
branches: [ master ]
|
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
name: Upload Release Asset
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Pre-build
|
|
||||||
run: sudo apt install -y libfuse-dev pkg-config
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Build
|
|
||||||
run: cargo build --verbose --release
|
|
||||||
- name: Upload to release
|
|
||||||
uses: JasonEtco/upload-to-release@master
|
|
||||||
with:
|
|
||||||
args: target/release/mus_fuse application/x-pie-executable
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
publish:
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Upload to release
|
- name: Checkout code
|
||||||
uses: JasonEtco/upload-to-release@master
|
uses: actions/checkout@v2
|
||||||
with:
|
- name: Pre-build
|
||||||
args: target/release/mus_fuse application/x-pie-executable
|
run: sudo apt install -y libfuse-dev pkg-config
|
||||||
env:
|
- uses: actions/checkout@v2
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
- name: Build
|
||||||
|
run: cargo build --verbose --release
|
||||||
|
- name: Create Release
|
||||||
|
id: create_release
|
||||||
|
uses: actions/create-release@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref }}
|
||||||
|
release_name: Release ${{ github.ref }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
- name: Upload Release Asset
|
||||||
|
id: upload-release-asset
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
|
||||||
|
asset_path: ./target/release/mus_fuse
|
||||||
|
asset_name: mus_fuse
|
||||||
|
asset_content_type: application/x-pie-executable
|
||||||
|
Reference in New Issue
Block a user