50 lines
1.6 KiB
YAML
50 lines
1.6 KiB
YAML
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
name: Create Release
|
|
|
|
jobs:
|
|
build:
|
|
name: Create Release
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@master
|
|
- name: Build project
|
|
run: |
|
|
rustup target add x86_64-unknown-linux-musl
|
|
cargo build --release
|
|
cargo build --release --target x86_64-unknown-linux-musl
|
|
zip --junk-paths release.zip garbage-*
|
|
- name: Create Release
|
|
id: create_release
|
|
uses: actions/create-release@v1.0.0
|
|
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.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: target/release/garbage
|
|
asset_name: garbage
|
|
asset_content_type: application/octet-stream
|
|
- name: Upload Musl Release Asset
|
|
id: upload-musl-release-asset
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: target/x86_64-unknown-linux-musl/release/garbage
|
|
asset_name: garbage-musl
|
|
asset_content_type: application/octet-stream
|