-
-
Notifications
You must be signed in to change notification settings - Fork 19
80 lines (79 loc) · 2.44 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
75
76
77
78
79
80
name: Build Luxtorpeda
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
env:
CARGO_HOME: ./cargo
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
run: |
rustup toolchain install 1.80.0 --profile minimal --no-self-update
rustup default 1.80.0
shell: bash
- name: Use rust cache
uses: Swatinem/rust-cache@v2
- name: Install Deps
run: sudo apt-get update && sudo apt-get -y install clang libsdl2-dev
shell: bash
- name: Install Godot
uses: chickensoft-games/setup-godot@v2
with:
version: 4.2.2
use-dotnet: false
include-templates: true
- name: Build
run: make release GODOT=godot
- name: Package
run: make version=${{ github.ref_name }} luxtorpeda.tar.xz GODOT=godot
- name: Calculate a checksum of release
run: sha512sum luxtorpeda.tar.xz > luxtorpeda.tar.xz.sha512
- name: Upload Release Artifact
uses: actions/upload-artifact@v4
with:
name: luxtorpeda.tar.xz
path: ./luxtorpeda.tar.xz
- name: Upload Checksum Artifact
uses: actions/upload-artifact@v4
with:
name: luxtorpeda.tar.xz.sha512
path: ./luxtorpeda.tar.xz.sha512
deploy:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: luxtorpeda.tar.xz
path: ./
- name: Download SHA Artifact
uses: actions/download-artifact@v4
with:
name: luxtorpeda.tar.xz.sha512
path: ./
- name: Rename Artifacts for Release Prep
run: |
mv luxtorpeda.tar.xz luxtorpeda-${{ github.ref_name }}.tar.xz
mv luxtorpeda.tar.xz.sha512 luxtorpeda-${{ github.ref_name }}.tar.xz.sha512
- name: Update name inside the checksum file
run: sed -i 's/luxtorpeda.tar.xz/luxtorpeda-${{ github.ref_name }}.tar.xz/g' luxtorpeda-${{ github.ref_name }}.tar.xz.sha512
- name: Create Release
id: create_release
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
draft: false
prerelease: false
generate_release_notes: true
files: |
luxtorpeda-${{ github.ref_name }}.tar.xz
luxtorpeda-${{ github.ref_name }}.tar.xz.sha512