2023-12-16 23:59:07 +00:00
|
|
|
name: Build and Publish Rust Binary
|
2023-12-17 00:10:06 +00:00
|
|
|
on: [push]
|
2023-12-16 20:29:06 +00:00
|
|
|
jobs:
|
2023-12-16 23:59:07 +00:00
|
|
|
build:
|
2023-12-16 23:59:56 +00:00
|
|
|
runs-on: docker
|
2023-12-16 20:29:06 +00:00
|
|
|
steps:
|
2023-12-17 01:57:41 +00:00
|
|
|
- name: Set up Rust
|
|
|
|
uses: msrd0/rust-toolchain@nightly
|
2023-12-16 23:59:07 +00:00
|
|
|
- name: Check out code
|
2023-12-17 00:28:36 +00:00
|
|
|
uses: actions/checkout@v4
|
2023-12-16 23:59:07 +00:00
|
|
|
- name: Build binary
|
|
|
|
run: cargo build --release
|
2023-12-17 02:36:21 +00:00
|
|
|
- name: Change directory to build directory
|
2023-12-17 02:37:00 +00:00
|
|
|
run: cd /workspace/musselman/version_name_generator/target/release && ls
|
2023-12-16 23:59:07 +00:00
|
|
|
- name: Publish binary
|
2023-12-17 02:20:02 +00:00
|
|
|
uses: earl-warren/action-gh-release@v1
|
2023-12-17 02:19:02 +00:00
|
|
|
if: startsWith(github.ref, 'refs/tags/')
|
2023-12-16 23:59:07 +00:00
|
|
|
with:
|
2023-12-17 03:04:40 +00:00
|
|
|
fail_on_unmatched_files: true
|
2023-12-17 02:42:58 +00:00
|
|
|
files: |
|
2023-12-17 03:06:31 +00:00
|
|
|
./version_name_generator
|