1- name : Release
2-
3- on :
4- push :
5- tags :
6- - ' v*'
7-
8- permissions :
9- contents : write # Required for creating releases and uploading assets
10-
11- env :
12- CARGO_TERM_COLOR : always
13- RUST_BACKTRACE : 1
14-
15- jobs :
16- create-release :
17- name : Create Release
18- runs-on : ubuntu-latest
19- steps :
20- - uses : actions/checkout@v4
21-
22- - name : Extract version from tag
23- id : get_version
24- run : echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
25-
26- - name : Create Release
27- id : release
28- uses : softprops/action-gh-release@v2
29- env :
30- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31- with :
32- tag_name : ${{ steps.get_version.outputs.VERSION }}
33- name : Ruby Butler ${{ steps.get_version.outputs.VERSION }}
34- body : |
35- 🎩 **Ruby Butler ${{ steps.get_version.outputs.VERSION }}**
36-
37- A sophisticated Ruby environment manager release with the refined precision of a proper gentleman's gentleman.
38-
39- ## Installation
40-
41- Download the appropriate binary for your platform below and place it in your PATH.
42-
43- ## What's New
44-
45- See the [CHANGELOG](https://github.com/RubyElders/ruby-butler/blob/main/CHANGELOG.md) for detailed changes.
46-
47- ## Binaries
48-
49- - **Linux**: `rb-linux` and `rb-linux-debug`
50- - **macOS**: `rb-macos` and `rb-macos-debug`
51- - **Windows**: `rb-windows.exe` and `rb-windows-debug.exe`
52-
53- ---
54- *At your distinguished service,*
55- *RubyElders.com*
56- draft : true
57- prerelease : false
58-
59- build-release :
60- name : Build Release Binaries
61- needs : create-release
62- strategy :
63- matrix :
64- include :
65- - os : ubuntu-latest
66- target : x86_64-unknown-linux-gnu
67- suffix : linux
68- ext : " "
69- - os : macos-x86_64-latest
70- target : x86_64-apple-darwin
71- suffix : macos
72- ext : " "
73- - os : macos-latest
74- target : aarch64-apple-darwin
75- suffix : macos
76- ext : " "
77- - os : windows-latest
78- target : x86_64-pc-windows-msvc
79- suffix : windows
80- ext : " .exe"
81- runs-on : ${{ matrix.os }}
82- steps :
83- - uses : actions/checkout@v4
84- with :
85- fetch-depth : 0 # Need full history for git info
86-
87- - name : Install Rust
88- uses : dtolnay/rust-toolchain@stable
89- with :
90- toolchain : 1.90.0
91- targets : ${{ matrix.target }}
92-
93- - name : Cache cargo registry
94- uses : actions/cache@v4
95- with :
96- path : |
97- ~/.cargo/registry
98- ~/.cargo/git
99- target
100- key : ${{ matrix.os }}-1.90.0-cargo-${{ hashFiles('**/Cargo.lock') }}
101- restore-keys : |
102- ${{ matrix.os }}-1.90.0-cargo-
103- ${{ matrix.os }}-cargo-
104-
105- - name : Build release binary
106- run : cargo build --release --target ${{ matrix.target }}
107-
108- - name : Build debug binary
109- run : cargo build --target ${{ matrix.target }}
110-
111- - name : Rename binaries with platform suffix
112- run : |
113- cp target/${{ matrix.target }}/release/rb${{ matrix.ext }} rb-${{ matrix.suffix }}${{ matrix.ext }}
114- cp target/${{ matrix.target }}/debug/rb${{ matrix.ext }} rb-${{ matrix.suffix }}-debug${{ matrix.ext }}
115-
116- - name : Upload release assets
117- uses : softprops/action-gh-release@v2
118- env :
119- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
120- with :
121- files : |
122- rb-${{ matrix.suffix }}${{ matrix.ext }}
123- rb-${{ matrix.suffix }}-debug${{ matrix.ext }}
1+ name : Release
2+
3+ on :
4+ push :
5+ tags :
6+ - ' v*'
7+
8+ permissions :
9+ contents : write # Required for creating releases and uploading assets
10+
11+ env :
12+ CARGO_TERM_COLOR : always
13+ RUST_BACKTRACE : 1
14+
15+ jobs :
16+ create-release :
17+ name : Create Release
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v4
21+
22+ - name : Extract version from tag
23+ id : get_version
24+ run : echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
25+
26+ - name : Create Release
27+ id : release
28+ uses : softprops/action-gh-release@v2
29+ env :
30+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31+ with :
32+ tag_name : ${{ steps.get_version.outputs.VERSION }}
33+ name : Ruby Butler ${{ steps.get_version.outputs.VERSION }}
34+ body : |
35+ 🎩 **Ruby Butler ${{ steps.get_version.outputs.VERSION }}**
36+
37+ A sophisticated Ruby environment manager release with the refined precision of a proper gentleman's gentleman.
38+
39+ ## Installation
40+
41+ Download the appropriate binary for your platform below and place it in your PATH.
42+
43+ ## What's New
44+
45+ See the [CHANGELOG](https://github.com/RubyElders/ruby-butler/blob/main/CHANGELOG.md) for detailed changes.
46+
47+ ## Binaries
48+
49+ - **Linux**: `rb-linux` and `rb-linux-debug`
50+ - **macOS**: `rb-macos` and `rb-macos-debug`
51+ - **Windows**: `rb-windows.exe` and `rb-windows-debug.exe`
52+
53+ ---
54+ *At your distinguished service,*
55+ *RubyElders.com*
56+ draft : true
57+ prerelease : false
58+
59+ build-release :
60+ name : Build Release Binaries
61+ needs : create-release
62+ strategy :
63+ matrix :
64+ include :
65+ - os : ubuntu-latest
66+ target : x86_64-unknown-linux-gnu
67+ suffix : linux
68+ ext : " "
69+ - os : macos-x86_64-latest
70+ target : x86_64-apple-darwin
71+ suffix : macos
72+ ext : " "
73+ - os : macos-latest
74+ target : aarch64-apple-darwin
75+ suffix : macos
76+ ext : " "
77+ - os : windows-latest
78+ target : x86_64-pc-windows-msvc
79+ suffix : windows
80+ ext : " .exe"
81+ runs-on : ${{ matrix.os }}
82+ steps :
83+ - uses : actions/checkout@v4
84+ with :
85+ fetch-depth : 0 # Need full history for git info
86+
87+ - name : Install Rust
88+ uses : dtolnay/rust-toolchain@stable
89+ with :
90+ toolchain : 1.90.0
91+ targets : ${{ matrix.target }}
92+
93+ - name : Cache cargo registry
94+ uses : actions/cache@v4
95+ with :
96+ path : |
97+ ~/.cargo/registry
98+ ~/.cargo/git
99+ target
100+ key : ${{ matrix.os }}-1.90.0-cargo-${{ hashFiles('**/Cargo.lock') }}
101+ restore-keys : |
102+ ${{ matrix.os }}-1.90.0-cargo-
103+ ${{ matrix.os }}-cargo-
104+
105+ - name : Build release binary
106+ run : cargo build --release --target ${{ matrix.target }}
107+
108+ - name : Build debug binary
109+ run : cargo build --target ${{ matrix.target }}
110+
111+ - name : Rename binaries with platform suffix
112+ run : |
113+ cp target/${{ matrix.target }}/release/rb${{ matrix.ext }} rb-${{ matrix.suffix }}${{ matrix.ext }}
114+ cp target/${{ matrix.target }}/debug/rb${{ matrix.ext }} rb-${{ matrix.suffix }}-debug${{ matrix.ext }}
115+
116+ - name : Upload release assets
117+ uses : softprops/action-gh-release@v2
118+ env :
119+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
120+ with :
121+ files : |
122+ rb-${{ matrix.suffix }}${{ matrix.ext }}
123+ rb-${{ matrix.suffix }}-debug${{ matrix.ext }}
0 commit comments