-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (39 loc) · 1.15 KB
/
Copy pathrelease.yml
File metadata and controls
39 lines (39 loc) · 1.15 KB
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
on:
push:
tags:
- v*
permissions:
contents: write
jobs:
release:
name: Release - ${{ matrix.platform.os-name }}
strategy:
matrix:
platform:
- runs-on: ubuntu-latest
target: x86_64-unknown-linux-gnu
executable: railroadscli
name: linux-x86_64-railroadscli
- runs-on: windows-latest
target: x86_64-pc-windows-msvc
executable: railroadscli.exe
name: windows-x86_64-railroadscli.exe
runs-on: ${{ matrix.platform.runs-on }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Cargo Build
uses: houseabsolute/actions-rust-cross@v1
with:
command: build
target: ${{ matrix.platform.target }}
args: --release
strip: true
- name: Rename Asset
run:
mv 'target/${{ matrix.platform.target }}/release/${{ matrix.platform.executable }}' '${{ matrix.platform.name }}'
- name: Upload Asset
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run:
gh release upload '${{ github.ref_name }}' '${{ matrix.platform.name }}'