-
Notifications
You must be signed in to change notification settings - Fork 2
99 lines (83 loc) · 3.12 KB
/
anchor-build-and-release.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Build and Release (Anchor)
on:
schedule: [{cron: "1 1 1 * *"}]
workflow_dispatch: { }
push:
paths-ignore:
- '**.md'
- '**.json'
- '.gitignore'
- '.vscode/**'
branches:
- anchor
jobs:
suite-build:
runs-on: ubuntu-latest
strategy:
max-parallel: 10
fail-fast: false
matrix:
suite: [ jammy ]
variant: [ gnome ]
architecture: [ amd64 ] # only amd64 for fast builds
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: docker/setup-qemu-action@v2
- name: ⤵️ Install Dependencies
run: |
sudo apt-get update
sudo apt-get install git build-essential binfmt-support qemu-user-static debootstrap -y
- name: 🛠️ Build ${{ matrix.suite }}-${{ matrix.variant }}-${{ matrix.architecture }}
run: sudo bash build.sh -s ${{ matrix.suite }} -v ${{ matrix.variant }} -a ${{ matrix.architecture }}
- name: ⬆️ Upload Tarballs
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.suite }}-${{ matrix.architecture }}-tarballs
path: fs-cook/out/${{ matrix.suite }}-${{ matrix.variant }}-${{ matrix.architecture }}.tar.gz
create-release:
runs-on: ubuntu-latest
if: ${{ always() }}
needs: suite-build
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: 📥 Download All Tarballs
uses: actions/[email protected]
with:
merge-multiple: true
- name: 🏷 Generate Release Tag
run: |
udroid_version=$(git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' \
https://github.com/RandomCoderOrg/ubuntu-on-android \
| tail -n1 | cut -d / -f 3 | cut -d v -f 2- )
udroid_download=$(
git -c 'versionsort.suffix=-' ls-remote --tags --sort='v:refname' \
https://github.com/RandomCoderOrg/udroid-download \
| tail -n1 | cut -d / -f 3
)
echo "VERSIONTAG=V${udroid_version}${BUILD_TYPE}R$((${udroid_download: -2} + 1))" >> $GITHUB_ENV
- name: 📝 Generate Release Notes
run: sudo bash /home/runner/work/udroid-download/udroid-download/.github/scripts/generate-release-notes.sh
- name: ⬆️ Upload Suite Tarballs
uses: ncipollo/release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ env.VERSIONTAG }}
name: ${{ env.VERSIONTAG }}
bodyFile: release.md
draft: false
prerelease: true
artifacts: '*-*-tarballs/*.tar.gz'
makeLatest: true
- name: ⚙️ Generate New distro-data.json
run: sudo python3 gen_data/gen-update-json.py --release-tag ${{ env.VERSIONTAG }}
- name: ⚙️ Update distro-data.json
uses: stefanzweifel/git-auto-commit-action@v4
with:
skip_fetch: false
skip_checkout: false
commit_message: 'AUTO JOB: (ANCHOR) update distro-data.json for ${{ env.VERSIONTAG }}'
file_pattern: distro-data.json