-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (35 loc) · 919 Bytes
/
autobuild.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
name: AutoBuild
on:
workflow_dispatch:
release:
types: [published]
# push:
# branches:
# - main
# pull_request:
# branches:
# - main
jobs:
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build
run: |
echo "cd code dir ${{ github.workspace }}"
cd ${{ github.workspace }}/build
sudo ./release.sh ${GITHUB_SHA} ${GITHUB_REF}
- name: Upload test Image
if: github.event_name != 'release'
uses: actions/upload-artifact@v4
with:
name: build-artifacts
path: ${{ github.workspace }}/build/*.xz
- name: Upload Release Image
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
tag_name: ${{env.TAG_NAME}}
token: ${{ secrets.RELEASE_TOKEN }}
files: ${{ github.workspace }}/build/*.xz