This repository has been archived by the owner on Mar 28, 2024. It is now read-only.
forked from bestouff/genext2fs
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (59 loc) · 1.95 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
66
67
name: Compile and Publish genext2fs
on:
push:
branches:
- master
- main
jobs:
build:
runs-on: ubuntu-20.04
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build
run: |
docker run --rm -v $PWD:/app/src -w /app/src ubuntu:20.04 bash -c " \
export DEBIAN_FRONTEND=noninteractive; \
sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list; \
apt-get update && apt-get install -y devscripts build-essential lintian debhelper wget && \
apt-get build-dep -y genext2fs && \
wget http://deb.debian.org/debian/pool/main/g/genext2fs/genext2fs_1.5.0.orig.tar.gz && \
mv genext2fs_1.5.0.orig.tar.gz ../ && \
debuild -S -us -uc; \
debuild -us -uc; \
mv ../genext2fs_*.deb ./genext2fs.deb; \
"
- name: Save package
uses: actions/upload-artifact@v3
with:
name: genext2fs
path: build
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: release_${{ github.sha }}
release_name: Release ${{ github.ref }}
body: |
Release @${{ github.ref }}
draft: true
prerelease: false
- name: Upload release asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./genext2fs.deb
asset_name: genext2fs.deb
asset_content_type: application/gzip
- name: Publish release
uses: StuYarrow/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
id: ${{ steps.create_release.outputs.id }}