-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (50 loc) · 1.99 KB
/
action.yml
File metadata and controls
62 lines (50 loc) · 1.99 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
name: GitHub Actions
on: [push]
permissions:
contents: write
jobs:
action-run:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "The ${{ github.workspace }} is now ready to test your code on the runner."
- run: ls ${{ github.workspace }}
- run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build llvm
curl -fsSL https://fvm.app/install.sh | bash
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build APK
shell: bash
run: make
- name: Get the release version from the tag
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Export package
shell: bash
if: startsWith(github.ref, 'refs/tags/')
run: |
binary_name="musicbox"
output="$binary_name-arm-${{ env.VERSION }}.apk"
echo "ASSET_ARM=build/$output" >> $GITHUB_ENV
output="$binary_name-arm64-${{ env.VERSION }}.apk"
echo "ASSET_ARM64=build/$output" >> $GITHUB_ENV
output="$binary_name-x64-${{ env.VERSION }}.apk"
echo "ASSET_X64=build/$output" >> $GITHUB_ENV
- name: Upload the package
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
${{ env.ASSET_ARM }}
${{ env.ASSET_ARM64 }}
${{ env.ASSET_X64 }}
- run: echo "🍏 This job's status is ${{ job.status }}."