-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (55 loc) · 1.66 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
name: Build and upload
on:
pull_request: {}
push:
branches:
- '*'
tags:
- '*'
# Must set Settings -> Actions -> General -> Workflow permissions to
# "Read and write permissions"
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # For git describe
fetch-tags: true
- name: Install clickable
run: pip3 install --user --upgrade clickable-ut
- name: Build
env:
ARCH: ${{ matrix.arch }}
run: |
clickable build --arch amd64 --output .
clickable build --arch arm64 --output .
clickable build --arch armhf --output .
- name: Generate variables
id: filename
env:
ARCH: ${{ matrix.arch }}
run: |
echo "version=$(git describe --tags --always)" >> $GITHUB_OUTPUT
- name: Upload package
uses: actions/upload-artifact@v2
with:
path: annotate.semphris_*.click
- name: Upload to the OpenStore
if: startsWith(github.ref, 'refs/tags/')
env:
OPENSTORE_API_KEY: ${{ secrets.OPENSTORE_API_KEY }}
shell: bash
run: |
clickable publish -a amd64 -- "$(git tag -l "$(git describe --tags --exact-match)" --format='%(contents)')"
clickable publish -a arm64
clickable publish -a armhf
- name: Create Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
name: ${{ steps.filename.outputs.version }}
files: annotate.semphris_*.click
draft: true