version_name_generator/.forgejo/workflows/build-and-release.yml

28 lines
745 B
YAML
Raw Normal View History

2023-12-16 17:59:07 -06:00
name: Build and Publish Rust Binary
2023-12-16 18:10:06 -06:00
on: [push]
2023-12-16 14:29:06 -06:00
jobs:
2023-12-16 17:59:07 -06:00
build:
2023-12-16 17:59:56 -06:00
runs-on: docker
2023-12-16 14:29:06 -06:00
steps:
2023-12-16 19:57:41 -06:00
- name: Set up Rust
uses: msrd0/rust-toolchain@nightly
2023-12-16 17:59:07 -06:00
- name: Check out code
2023-12-16 18:28:36 -06:00
uses: actions/checkout@v4
2023-12-16 17:59:07 -06:00
- name: Build binary
run: cargo build --release
2023-12-16 21:29:06 -06:00
- uses: actions/upload-artifact@v3
with:
2023-12-16 21:31:05 -06:00
name: version_name_generator
2023-12-16 21:33:19 -06:00
path: ./target/release/version_name_generator
2023-12-16 21:29:06 -06:00
- uses: actions/download-artifact@v3
with:
2023-12-16 21:31:05 -06:00
name: version_name_generator
2023-12-16 17:59:07 -06:00
- name: Publish binary
2023-12-16 20:20:02 -06:00
uses: earl-warren/action-gh-release@v1
2023-12-16 20:19:02 -06:00
if: startsWith(github.ref, 'refs/tags/')
2023-12-16 17:59:07 -06:00
with:
2023-12-16 21:04:40 -06:00
fail_on_unmatched_files: true
2023-12-16 20:42:58 -06:00
files: |
2023-12-16 21:11:27 -06:00
./target/release/version_name_generator
2023-12-16 21:08:06 -06:00