This repository was archived by the owner on Mar 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (60 loc) · 1.92 KB
/
rust_deploy.yml
File metadata and controls
63 lines (60 loc) · 1.92 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Rust Deploy
permissions:
id-token: write
contents: write
packages: write
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
on:
push:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
deploy-server:
runs-on: ubuntu-latest
steps:
# Install Dependencies
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0
- name: "Git Version"
id: "version"
uses: "codacy/git-version@2.4.0"
- name: Install podman and cross
run: |
sudo apt install -y podman
cargo install cross
# Build
- name: "Build x86_64-pc-windows-gnu"
run: |
cross clean
cross build --target x86_64-pc-windows-gnu -r
strip -s target/x86_64-pc-windows-gnu/release/xtimer.exe
- name: "Compress x86_64-pc-windows-gnu"
uses: "vimtor/action-zip@v1.1"
with:
files: "target/x86_64-pc-windows-gnu/release/xtimer.exe"
dest: "xtimer-v${{ steps.version.outputs.version }}-x86_64-pc-windows-gnu.zip"
- name: "Build x86_64-unknown-linux-gnu"
run: |
cross clean
cross build --target x86_64-unknown-linux-gnu -r
strip -s target/x86_64-unknown-linux-gnu/release/xtimer
- name: "Compress x86_64-unknown-linux-gnu"
uses: "vimtor/action-zip@v1.1"
with:
files: "target/x86_64-unknown-linux-gnu/release/xtimer"
dest: "xtimer-v${{ steps.version.outputs.version }}-x86_64-unknown-linux-gnu.zip"
# Create Release
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "${{ steps.version.outputs.version }}"
prerelease: false
title: "${{ steps.version.outputs.version }}"
files: |
*.zip