Skip to content

Commit

Permalink
Updated release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nimaaskarian committed Feb 1, 2024
1 parent b59ebc7 commit c95e2cf
Showing 1 changed file with 11 additions and 37 deletions.
48 changes: 11 additions & 37 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,22 @@
name: Release

on:
push:
tags:
- '*'

jobs:
build-and-release:
release:
name: Release ${{ matrix.target }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
target: [x86_64-pc-windows-gnu, x86_64-unknown-linux-musl]
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Rust
uses: actions/setup-rust@v1

- name: Build for Linux
run: cargo build --release --target x86_64-unknown-linux-gnu

- name: Build for Windows
run: cargo build --release --target x86_64-pc-windows-msvc

- name: Create release
id: create_release
uses: actions/create-release@v1
- uses: actions/checkout@v2
- name: Compile and release
uses: rust-build/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
body: |
Changes in this release.
draft: false
prerelease: false

- name: Upload Linux build
uses: actions/upload-artifact@v2
with:
name: c3.x86.linux
path: target/x86_64-unknown-linux-gnu/release/c3

- name: Upload Windows build
uses: actions/upload-artifact@v2
with:
name: c3.x86_64.windows.exe
path: target/x86_64-pc-windows-msvc/release/c3
RUSTTARGET: ${{ matrix.target }}
EXTRA_FILES: "README.md LICENSE"

0 comments on commit c95e2cf

Please sign in to comment.