Build and upload release artifacts from CI
type: distribution
This commit is contained in:
parent
70e0091ec0
commit
cf59a58c67
|
@ -1,4 +1,4 @@
|
||||||
name: Rust
|
name: Main
|
||||||
|
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
|
@ -10,6 +10,13 @@ jobs:
|
||||||
- macos-latest
|
- macos-latest
|
||||||
- ubuntu-latest
|
- ubuntu-latest
|
||||||
- windows-latest
|
- windows-latest
|
||||||
|
include:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
target: x86_64-unknown-linux-musl
|
||||||
|
- os: macos-latest
|
||||||
|
target: x86_64-apple-darwin
|
||||||
|
- os: windows-latest
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
runs-on: ${{matrix.os}}
|
runs-on: ${{matrix.os}}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
|
@ -17,6 +24,7 @@ jobs:
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
target: ${{matrix.target}}
|
||||||
profile: minimal
|
profile: minimal
|
||||||
components: clippy, rustfmt
|
components: clippy, rustfmt
|
||||||
override: true
|
override: true
|
||||||
|
@ -31,13 +39,27 @@ jobs:
|
||||||
run: cargo test --all --verbose
|
run: cargo test --all --verbose
|
||||||
- name: Clippy
|
- name: Clippy
|
||||||
run: cargo clippy --all
|
run: cargo clippy --all
|
||||||
- name: Format
|
|
||||||
run: cargo fmt --all -- --check
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
if: matrix.os != 'windows-latest'
|
if: matrix.os != 'windows-latest'
|
||||||
run: "! grep --color -REn 'FIXME|TODO|XXX' src"
|
run: "! grep --color -REn 'FIXME|TODO|XXX' src"
|
||||||
|
- name: Format
|
||||||
|
run: cargo fmt --all -- --check
|
||||||
- name: Readme
|
- name: Readme
|
||||||
if: matrix.os != 'windows-latest'
|
if: matrix.os != 'windows-latest'
|
||||||
run: |
|
run: |
|
||||||
cargo run --package update-readme toc
|
cargo run --package update-readme toc
|
||||||
git diff --no-ext-diff --quiet --exit-code
|
git diff --no-ext-diff --quiet --exit-code
|
||||||
|
- name: Package
|
||||||
|
id: package
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
run: ./bin/package ${{github.ref}} ${{matrix.os}} ${{matrix.target}}
|
||||||
|
shell: bash
|
||||||
|
- name: Publish
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
if: startsWith(github.ref, 'refs/tags/v')
|
||||||
|
with:
|
||||||
|
draft: false
|
||||||
|
files: ${{steps.package.outputs.archive}}
|
||||||
|
prerelease: false
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
|
Loading…
Reference in New Issue
Block a user