mirror of
https://github.com/house-of-vanity/mus-fuse.git
synced 2025-08-21 16:17:15 +00:00
Fix CI
This commit is contained in:
121
.github/workflows/build.yml
vendored
121
.github/workflows/build.yml
vendored
@@ -6,7 +6,8 @@ on:
|
|||||||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
make:
|
make_arch:
|
||||||
|
name: Build Arch Linux package
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: archlinux
|
image: archlinux
|
||||||
@@ -20,8 +21,32 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
PKGBUILD: $GITHUB_WORKSPACE/.github/workflows/PKGBUILD
|
PKGBUILD: $GITHUB_WORKSPACE/.github/workflows/PKGBUILD
|
||||||
OUTDIR: $HOME/arch-packages
|
OUTDIR: $HOME/arch-packages
|
||||||
build:
|
- run: mv *tar.xz mus-fuse-x86_64.tar.xz
|
||||||
name: Upload Release Asset
|
- name: Upload Arch Package
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: mus-fuse-x86_64.tar.xz
|
||||||
|
path: ./mus-fuse-x86_64.tar.xz
|
||||||
|
|
||||||
|
make_bin:
|
||||||
|
name: Build binary
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
- name: Pre-build
|
||||||
|
run: sudo apt install -y libfuse-dev pkg-config
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Build binary
|
||||||
|
run: cargo build --release
|
||||||
|
- name: Upload binary
|
||||||
|
uses: actions/upload-artifact@v1
|
||||||
|
with:
|
||||||
|
name: mus-fuse
|
||||||
|
path: ./target/release/mus-fuse
|
||||||
|
|
||||||
|
make_deb:
|
||||||
|
name: Make Deb package
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
@@ -29,37 +54,65 @@ jobs:
|
|||||||
- name: Pre-build
|
- name: Pre-build
|
||||||
run: sudo apt install -y libfuse-dev pkg-config && cargo install cargo-deb
|
run: sudo apt install -y libfuse-dev pkg-config && cargo install cargo-deb
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Build binary
|
|
||||||
run: cargo build --release
|
|
||||||
- name: Build deb
|
- name: Build deb
|
||||||
run: cargo deb --output ./target/debian/mus-fuse_amd64.deb
|
run: cargo deb --output ./target/debian/mus-fuse_amd64.deb
|
||||||
- name: Create Release
|
- name: Upload binary
|
||||||
id: create_release
|
uses: actions/upload-artifact@v1
|
||||||
uses: actions/create-release@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
with:
|
||||||
tag_name: ${{ github.ref }}
|
name: mus-fuse_amd64.deb
|
||||||
release_name: Release ${{ github.ref }}
|
path: ./target/debian/mus-fuse_amd64.deb
|
||||||
draft: false
|
|
||||||
prerelease: false
|
publish:
|
||||||
- name: Upload Release Bin
|
name: Publish release
|
||||||
id: upload-release-asset-bin
|
needs: [build_bin, make_deb, make_arch]
|
||||||
uses: actions/upload-release-asset@v1
|
runs-on: ubuntu-latest
|
||||||
env:
|
steps:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
- name: Download binary
|
||||||
with:
|
uses: actions/download-artifact@v1
|
||||||
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
|
with:
|
||||||
asset_path: ./target/release/mus-fuse
|
name: mus-fuse
|
||||||
asset_name: mus-fuse
|
- name: Download Arch Package
|
||||||
asset_content_type: application/x-pie-executable
|
uses: actions/download-artifact@v1
|
||||||
- name: Upload Release Deb
|
with:
|
||||||
id: upload-release-asset-deb
|
name: mus-fuse-x86_64.tar.xz
|
||||||
uses: actions/upload-release-asset@v1
|
- name: Download Deb Package
|
||||||
env:
|
uses: actions/download-artifact@v1
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
with:
|
||||||
with:
|
name: mus-fuse_amd64.deb
|
||||||
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
|
- name: Create Release
|
||||||
asset_path: ./target/debian/mus-fuse_amd64.deb
|
id: create_release
|
||||||
asset_name: mus-fuse_amd64.deb
|
uses: actions/create-release@v1
|
||||||
asset_content_type: application/vnd.debian.binary-package
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
tag_name: ${{ github.ref }}
|
||||||
|
release_name: Release ${{ github.ref }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
|
- name: Upload Binary Release
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./mus-fuse/mus-fuse
|
||||||
|
asset_name: mus-fuse
|
||||||
|
asset_content_type: application/x-pie-executable;
|
||||||
|
- name: Upload Deb Release
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./mus-fuse/mus-fuse_amd64.deb
|
||||||
|
asset_name: mus-fuse_amd64.deb
|
||||||
|
asset_content_type: application/vnd.debian.binary-package;
|
||||||
|
- name: Upload Arch Linux Release
|
||||||
|
uses: actions/upload-release-asset@v1
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
with:
|
||||||
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||||
|
asset_path: ./mus-fuse/mus-fuse-x86_64.tar.xz
|
||||||
|
asset_name: arch_linux_mus-fuse-x86_64.tar.xz
|
||||||
|
asset_content_type: application/x-xz;
|
||||||
|
Reference in New Issue
Block a user