-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (34 loc) · 1.41 KB
/
cargo-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# This GitHub Actions workflow is designed to run the Cargo Release process
# whenever there is a push to the 'main' branch or the workflow is manually triggered.
name: Run Cargo Release
on:
push:
branches:
- main # Trigger the workflow on push events to the 'main' branch
workflow_dispatch: # Allow manual triggering of the workflow
jobs:
cargo_release:
name: Run Cargo Release
runs-on: windows-latest # Use the latest Windows runner
steps:
- name: Checkout Repository
uses: actions/checkout@v4 # Checkout the repository using the specified action
- name: Set Up Lua
- uses: xpol/setup-lua@v1
with:
lua-version: '5.1.5'
- name: Set Up Rust
uses: actions-rs/toolchain@v1 # Set up the Rust toolchain
with:
toolchain: stable # Use the stable Rust toolchain
override: true # Override any existing toolchain configuration
- name: Build
run: cargo build
- name: Test
run: lua.exe ltests/test.lua
- name: Install Cargo Release
run: cargo install cargo-release # Install the cargo-release tool
- name: Run Cargo Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Use the GitHub token for authentication
run: cargo release --execute --no-publish # Run the cargo release command only creating a new tag but not publishing to crates.io