Skip to content

Commit

Permalink
Create rust.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AviiNL authored Feb 28, 2024
1 parent a2fd84a commit 5f109c6
Showing 1 changed file with 57 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: release
on:
push:
tags:
- "v*"

jobs:
release:
name: Create Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Create Release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false

publish:
name: publish ${{ matrix.name }}
needs:
- release
strategy:
fail-fast: true
matrix:
include:
- target: x86_64-pc-windows-gnu
suffix: windows-x86_64
archive: zip
name: x86_64-pc-windows-gnu
- target: x86_64-unknown-linux-gnu
suffix: linux-x86_64
archive: tar.xz
name: x86_64-unknown-linux-gnu
- target: x86_64-apple-darwin
suffix: darwin-x86_64
archive: tar.gz
name: x86_64-apple-darwin
runs-on: ubuntu-latest
steps:
- name: Clone test repository
uses: actions/checkout@v2
- uses: xhaiker/[email protected]
name: build ${{ matrix.name }}
with:
release: ${{ github.ref_name }}
rust_target: ${{ matrix.target }}
archive_suffix: ${{ matrix.suffix }}
archive_types: ${{ matrix.archive }}
extra_files: "README.md README_zh.md LICENSE"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5f109c6

Please sign in to comment.