clean(upload): remove not needed return #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- stable | |
name: Create Release | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
changelog: | |
outputs: | |
tag: ${{ steps.changelog.outputs.tag }} | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
name: Create Changelog | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Source code | |
uses: actions/checkout@v4 | |
- name: Create Conventional Changelog | |
id: changelog | |
uses: TriPSs/conventional-changelog-action@v5 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
version-file: './Cargo.toml' | |
version-path: "package.version" | |
- name: Create Release | |
id: create_release | |
uses: ncipollo/release-action@v1 | |
if: ${{ steps.changelog.outputs.skipped == 'false' }} | |
with: | |
tag: ${{ steps.changelog.outputs.tag }} | |
name: ${{ steps.changelog.outputs.tag }} | |
body: ${{ steps.changelog.outputs.clean_changelog }} | |
release-build: | |
name: Build Release - ${{ matrix.platform.release_for }} | |
needs: changelog | |
strategy: | |
matrix: | |
platform: | |
- release_for: FreeBSD-x86_64 | |
os: ubuntu-20.04 | |
target: x86_64-unknown-freebsd | |
bin: red_oxide | |
name: red_oxide-FreeBSD-x86_64 | |
command: build | |
content-type: application/x-elf | |
- release_for: Linux-x86_64-gnu | |
os: ubuntu-20.04 | |
target: x86_64-unknown-linux-gnu | |
bin: red_oxide | |
name: red_oxide-Linux-x86_64-gnu | |
command: build | |
content-type: application/x-elf | |
- release_for: Linux-x86_64-musl | |
os: ubuntu-20.04 | |
target: x86_64-unknown-linux-musl | |
bin: red_oxide | |
name: red_oxide-Linux-x86_64-musl | |
command: build | |
content-type: application/x-elf | |
- release_for: Linux-i686 | |
os: ubuntu-20.04 | |
target: i686-unknown-linux-gnu | |
bin: red_oxide | |
name: red_oxide-Linux-i686 | |
command: build | |
content-type: application/x-elf | |
- release_for: Linux-aarch64 | |
os: ubuntu-20.04 | |
target: aarch64-unknown-linux-gnu | |
bin: red_oxide | |
name: red_oxide-Linux-aarch64 | |
command: build | |
content-type: application/x-elf | |
- release_for: Linux-armv7 | |
os: ubuntu-20.04 | |
target: armv7-unknown-linux-gnueabihf | |
bin: red_oxide | |
name: red_oxide-Linux-armv7 | |
command: build | |
content-type: application/x-elf | |
- release_for: Windows-x86_64 | |
os: windows-latest | |
target: x86_64-pc-windows-msvc | |
bin: red_oxide.exe | |
name: red_oxide-Windows-x86_64.exe | |
command: build | |
content-type: application/vnd.microsoft.portable-executable | |
- release_for: Windows-i686 | |
os: windows-latest | |
target: i686-pc-windows-msvc | |
bin: red_oxide.exe | |
name: red_oxide-Windows-i686.exe | |
command: build | |
content-type: application/vnd.microsoft.portable-executable | |
- release_for: macOS-x86_64 | |
os: macOS-latest | |
target: x86_64-apple-darwin | |
bin: red_oxide | |
name: red_oxide-Darwin-x86_64 | |
command: build | |
content-type: application/x-elf | |
- release_for: macOS-aarch64 | |
os: macOS-latest | |
target: aarch64-apple-darwin | |
bin: red_oxide | |
name: red_oxide-Darwin-aarch64 | |
command: build | |
content-type: application/x-elf | |
runs-on: ${{ matrix.platform.os }} | |
steps: | |
- name: Checkout Source code | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ needs.changelog.outputs.tag }} | |
- name: Install musl-tools on Linux | |
run: sudo apt-get update --yes && sudo apt-get install --yes musl-tools | |
if: contains(matrix.platform.name, 'musl') | |
- name: Build binary | |
uses: houseabsolute/actions-rust-cross@v0 | |
with: | |
command: ${{ matrix.platform.command }} | |
target: ${{ matrix.platform.target }} | |
args: "--release" | |
strip: true | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.changelog.outputs.upload_url }} | |
asset_path: target/${{ matrix.platform.target }}/release/${{ matrix.platform.bin }} | |
asset_name: ${{ matrix.platform.name }} | |
asset_content_type: ${{ matrix.platform.content-type }} |