Skip to content

Commit 8c939bf

Browse files
committed
feat: build and release workflow
1 parent 56db743 commit 8c939bf

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Release version'
8+
required: true
9+
type: string
10+
11+
env:
12+
CARGO_TERM_COLOR: always
13+
14+
jobs:
15+
build-and-release:
16+
strategy:
17+
matrix:
18+
include:
19+
- os: ubuntu-latest
20+
target: x86_64-unknown-linux-gnu
21+
binary_extension: ''
22+
- os: windows-latest
23+
target: x86_64-pc-windows-msvc
24+
binary_extension: '.exe'
25+
- os: macos-latest-xlarge
26+
target: aarch64-apple-darwin
27+
binary_extension: ''
28+
runs-on: ${{ matrix.os }}
29+
permissions:
30+
contents: write
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- name: Build
36+
run: cargo build --release --target ${{ matrix.target }}
37+
38+
- name: Create GitHub Release
39+
uses: softprops/action-gh-release@v1
40+
with:
41+
tag_name: v${{ github.event.inputs.version }}
42+
name: Release v${{ github.event.inputs.version }}
43+
draft: false
44+
prerelease: false
45+
files: |
46+
target/${{ matrix.target }}/release/itu-keplerbot${{ matrix.binary_extension }}
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)