-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
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
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 }} |