forked from yuk7/AlpineWSL
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (82 loc) · 2.41 KB
/
release-zip.yaml
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
name: Release Zip CI
on:
workflow_dispatch:
push:
tags:
- "*.*.*"
jobs:
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Install dependencies for build (Apt)
shell: bash
run: |
sudo env DEBIAN_FRONTEND=noninteractive apt update -y && \
sudo env DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends libarchive-tools curl jq tree
- name: Build Zip x64
shell: bash
env:
ARCH: 'x64'
OUT_ZIP: 'Alpine.zip'
LNCR_EXE: 'alpine-3.19.0.exe'
run: make -j$(nproc)
- name: Build Zip ARM64
shell: bash
env:
ARCH: 'arm64'
OUT_ZIP: 'Alpine_arm64.zip'
LNCR_EXE: 'alpine_arm64-3.19.0.exe'
run: rm -rf rootfs && make -j$(nproc)
- name: Upload a Build Artifact x64
uses: actions/upload-artifact@main
with:
name: Alpine.zip
path: Alpine.zip
- name: Upload a Build Artifact ARM64
uses: actions/upload-artifact@main
with:
name: Alpine_arm64.zip
path: Alpine_arm64.zip
Release:
needs: [Build]
runs-on: ubuntu-latest
steps:
- name: Download Build Artifact x64
uses: actions/download-artifact@main
with:
name: Alpine.zip
- name: Download Build Artifact arm64
uses: actions/download-artifact@main
with:
name: Alpine_arm64.zip
- name: Create release
id: create_release
uses: actions/create-release@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset x64
id: upload-release-asset-x64
uses: actions/upload-release-asset@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Alpine.zip
asset_name: Alpine.zip
asset_content_type: application/zip
- name: Upload Release Asset arm64
id: upload-release-asset-arm64
uses: actions/upload-release-asset@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: Alpine_arm64.zip
asset_name: Alpine_arm64.zip
asset_content_type: application/zip