Skip to content

Commit

Permalink
Create rust_release.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
yowu authored Feb 22, 2025
1 parent 327f3fa commit 19ce86a
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/rust_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Rust Build and Release

on:
push:
tags:
- 'v*' # Trigger the workflow when a tag starting with 'v' is pushed, indicating a version change

jobs:
build_and_release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- name: Build the project
run: cargo build --release

- name: Create Release
uses: softprops/action-gh-release@v1
if: github.ref_type == 'tag'
with:
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
body: |
This is a release for ctags_ls version ${{ github.ref_name }}.
Please refer to the changelog for details.
files: |
target/release/ctags_ls${{ '.exe' if matrix.os == 'windows-latest' else '' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 19ce86a

Please sign in to comment.