-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (71 loc) · 2.08 KB
/
build.yml
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
64
65
66
67
68
69
70
71
72
73
74
name: Build and Release
on:
push:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
update_version:
permissions:
contents: write
runs-on: ubuntu-latest
outputs:
new_tag: ${{ steps.tag_version.outputs.new_tag }}
steps:
- uses: actions/checkout@v4
- name: Bump version and push tag
id: tag_version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
build_linux:
needs: update_version
runs-on: ubuntu-latest
# permissions:
# contents: write
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --release --target x86_64-unknown-linux-gnu
- run: mv target/x86_64-unknown-linux-gnu/release/norminette_lsp norminette_lsp-x86_64-unknown-linux-gnu
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: x86_64-unknown-linux-gnu
path: norminette_lsp-x86_64-unknown-linux-gnu
build_macos:
needs: update_version
runs-on: macos-latest
# permissions:
# contents: write
steps:
- uses: actions/checkout@v4
- name: Build
run: cargo build --release --target aarch64-apple-darwin
- run: mv target/aarch64-apple-darwin/release/norminette_lsp norminette_lsp-aarch64-apple-darwin
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: aarch64-apple-darwin
path: norminette_lsp-aarch64-apple-darwin
release:
needs: [update_version, build_linux, build_macos]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Download Linux Artifact
uses: actions/download-artifact@v4
with:
name: x86_64-unknown-linux-gnu
- name: Download macOS Artifact
uses: actions/download-artifact@v4
with:
name: aarch64-apple-darwin
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.update_version.outputs.new_tag }}
files: |
norminette_lsp-x86_64-unknown-linux-gnu
norminette_lsp-aarch64-apple-darwin