3
3
inputs :
4
4
ppa :
5
5
description : " ppa sufix"
6
- unpublished :
7
- description : " don't wait to publish, take from build page"
6
+ # unpublished:
7
+ # description: "don't wait to publish, take from build page"
8
8
9
9
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
10
10
jobs :
@@ -15,40 +15,52 @@ jobs:
15
15
# Steps represent a sequence of tasks that will be executed as part of the job
16
16
steps :
17
17
- uses : actions/checkout@v3
18
- # Runs a set of commands using the runners shell
19
- - name : Run a multi-line script
18
+ - name : get name version
20
19
run : |
21
20
#proj
22
21
name=`cat debian/changelog | head -1 | grep -o ^[^\ ]*`
22
+ echo "name=${name}" >> $GITHUB_ENV
23
+ version=`cat debian/changelog | head -1 | grep -Poe "[^\(]*(?=\))"`
24
+ echo "version=${version}" >> $GITHUB_ENV
25
+ - uses : dsaltares/fetch-gh-release-asset@master
26
+ # this is locally: throw new Error("Parameter token or opts.auth is required");
27
+ with :
28
+ # repo: 'colin-i/test'
29
+ file : " ${{ env.name }}_${{ env.version }}_i386.deb'
30
+ target: " ${{ env.name }}.deb"
31
+ token : ${{ secrets.PAT }}
32
+ # Runs a set of commands using the runners shell
33
+ - name : Run a multi-line script
34
+ run : |
23
35
#get deb
24
- if [ "${{ github.event.inputs.unpublished }}" = "" ]; then
25
- echo published
26
- dist=`cat debian/changelog | head -1 | grep -Poe "[^ ]*(?=;)"`
27
- src=ppa.launchpadcontent.net/colin-i/ppa${{ github.event.inputs.ppa }}
28
- wget http://${src}/ubuntu/dists/${dist}/main/binary-i386/Packages.xz
29
- xz -d Packages.xz
30
- debfilename=`grep "^Filename.*/${name}_" Packages | tail -1 | cut -d ' ' -f 2`
31
- wget http://${src}/ubuntu/${debfilename} -O ${name}.deb
32
- else
33
- echo unpublished
34
- version=`cat debian/changelog | head -1 | grep -Poe "[^\(]*(?=\))"`
35
- arh=`cat debian/control | grep ^Architecture | cut -d ' ' -f2`
36
- if [ ! -e "lp2.py" ]; then
37
- wget -q https://raw.githubusercontent.com/colin-i/test/master/lp2.py
38
- #on focal is already, python3-launchpadlib is already the newest version
39
- #sudo apt install python3-launchpadlib
40
- fi
41
- OUTPUT=$(python3 lp2.py ppa${{ github.event.inputs.ppa }} ${name} ${version} ${arh})
42
- wget ${OUTPUT}/+files/${name}_${version}_${arh}.deb -O ${name}.deb
43
- #f=`wget -q https://launchpad.net/~colin-i/+archive/ubuntu/ppa${{ github.event.inputs.ppa }}/+build/${{ github.event.inputs.unpublished }} -O - | grep -Poe "[^\"]*(?=\.deb\")"`
44
- #wget ${f}.deb -O ${name}.deb
45
- fi
36
+ # if [ "${{ github.event.inputs.unpublished }}" = "" ]; then
37
+ # echo published
38
+ # dist=`cat debian/changelog | head -1 | grep -Poe "[^ ]*(?=;)"`
39
+ # src=ppa.launchpadcontent.net/colin-i/ppa${{ github.event.inputs.ppa }}
40
+ # wget http://${src}/ubuntu/dists/${dist}/main/binary-i386/Packages.xz
41
+ # xz -d Packages.xz
42
+ # debfilename=`grep "^Filename.*/${name}_" Packages | tail -1 | cut -d ' ' -f 2`
43
+ # wget http://${src}/ubuntu/${debfilename} -O ${name}.deb
44
+ # else
45
+ # echo unpublished
46
+ # version=`cat debian/changelog | head -1 | grep -Poe "[^\(]*(?=\))"`
47
+ # arh=`cat debian/control | grep ^Architecture | cut -d ' ' -f2`
48
+ # if [ ! -e "lp2.py" ]; then
49
+ # wget -q https://raw.githubusercontent.com/colin-i/test/master/lp2.py
50
+ # #on focal is already, python3-launchpadlib is already the newest version
51
+ # #sudo apt install python3-launchpadlib
52
+ # fi
53
+ # OUTPUT=$(python3 lp2.py ppa${{ github.event.inputs.ppa }} ${name} ${version} ${arh})
54
+ # wget ${OUTPUT}/+files/${name}_${version}_${arh}.deb -O ${name}.deb
55
+ # #f=`wget -q https://launchpad.net/~colin-i/+archive/ubuntu/ppa${{ github.event.inputs.ppa }}/+build/${{ github.event.inputs.unpublished }} -O - | grep -Poe "[^\"]*(?=\.deb\")"`
56
+ # #wget ${f}.deb -O ${name}.deb
57
+ # fi
46
58
#make rpm
47
59
mkdir out
48
60
cd out
49
61
sudo apt update
50
62
sudo apt install alien
51
- sudo alien -rk ../${name}.deb
63
+ sudo alien -rk ../${{ env. name } }.deb
52
64
fname=`ls`
53
65
mv ${fname} ../${fname}
54
66
echo "file=${fname}" >> $GITHUB_ENV
0 commit comments