@@ -62,6 +62,118 @@ jobs:
6262 api() { bin/hub api -H 'accept: application/vnd.github.inertia-preview+json' "$@"; }
6363 cards=$(api projects/columns/$PENDING_COLUMN/cards | jq ".[].id")
6464 for card in $cards; do api projects/columns/cards/$card/moves --field position=top --field column_id=$DONE_COLUMN; done
65+ rpm-repos :
66+ if : " !contains(github.ref, '-')" # skip prereleases
67+ needs : goreleaser
68+ runs-on : ubuntu-latest
69+ steps :
70+ - name : Checkout
71+ uses : actions/checkout@v2
72+ - name : Get package artifacts
73+ uses : i3h/download-release-asset@v1
74+ with :
75+ owner : cli
76+ repo : cli
77+ tag : latest
78+ file : .*.rpm
79+ - name : install createrepo, rpm
80+ run : sudo apt-get install -y createrepo rpm
81+ - name : set up gpg
82+ run : |
83+ echo "Importing pubkey..."
84+ cat script/pubkey.asc | gpg --import --no-tty --batch --yes
85+ echo "Importing seckey..."
86+ echo ${{secrets.GPG_KEY}} | base64 -d | gpg --import --no-tty --batch --yes
87+ echo "Resetting gpg-agent and ingesting passphrase"
88+ echo "allow-preset-passphrase" > ~/.gnupg/gpg-agent.conf
89+ gpg-connect-agent RELOADAGENT /bye
90+ echo ${{secrets.GPG_PASSPHRASE}} | /usr/lib/gnupg2/gpg-preset-passphrase --preset 867DAD5051270B843EF54F6186FA10E3A1D22DC5
91+ - name : Sign RPMs
92+ run : |
93+ cp script/rpmmacros ~/.rpmmacros
94+ rpmsign --addsign *.rpm
95+ - name : Checkout pages site
96+ uses : actions/checkout@v2
97+ with :
98+ repository : github/cli.github.com
99+ path : site
100+ fetch-depth : 0
101+ token : ${{secrets.SITE_GITHUB_TOKEN}}
102+ - name : run createrepo
103+ run : |
104+ cp *.rpm site/packages/rpm/
105+ createrepo site/packages/rpm
106+ cd site/packages/rpm && gpg --yes --detach-sign --armor repodata/repomd.xml
107+ cd ../../../
108+ - name : publish site
109+ env :
110+ GIT_COMMITTER_NAME : cli automation
111+ GIT_AUTHOR_NAME : cli automation
112+ GIT_COMMITTER_EMAIL : noreply@github.com
113+ GIT_AUTHOR_EMAIL : noreply@github.com
114+ run : |
115+ git -C site add packages
116+ git -C site commit -m"${GITHUB_REF} rpm packages"
117+ git -C site push
118+
119+ deb-repos :
120+ if : " !contains(github.ref, '-')" # skip prereleases
121+ needs : goreleaser
122+ runs-on : ubuntu-latest
123+ steps :
124+ - name : Checkout
125+ uses : actions/checkout@v2
126+ - name : Get package artifacts
127+ uses : i3h/download-release-asset@v1
128+ with :
129+ owner : cli
130+ repo : cli
131+ tag : latest
132+ file : .*.deb
133+ - name : install reprepro
134+ run : sudo apt-get install -y reprepro
135+ - name : set up gpg
136+ run : |
137+ echo "Importing pubkey..."
138+ cat script/pubkey.asc | gpg --import --no-tty --batch --yes
139+ echo "Importing seckey..."
140+ echo ${{secrets.GPG_KEY}} | base64 -d | gpg --import --no-tty --batch --yes
141+ echo "Resetting gpg-agent and ingesting passphrase"
142+ echo "allow-preset-passphrase" > ~/.gnupg/gpg-agent.conf
143+ gpg-connect-agent RELOADAGENT /bye
144+ echo ${{secrets.GPG_PASSPHRASE}} | /usr/lib/gnupg2/gpg-preset-passphrase --preset 867DAD5051270B843EF54F6186FA10E3A1D22DC5
145+ - name : run reprepro
146+ env :
147+ RELEASES : " focal stable"
148+ run : |
149+ mkdir upload
150+ for release in $RELEASES; do
151+ for file in *.deb ; do
152+ /usr/bin/reprepro --confdir="+b/script" includedeb $release $file;
153+ done
154+ done
155+ - name : " Select repo artifacts"
156+ # Select only final repo artifacts (this makes reprepro runs stateless)
157+ run : cp -a dists/ pool/ upload/
158+ - name : Checkout pages site
159+ uses : actions/checkout@v2
160+ with :
161+ repository : github/cli.github.com
162+ path : site
163+ fetch-depth : 0
164+ token : ${{secrets.SITE_GITHUB_TOKEN}}
165+ - name : add files to site
166+ run : cp -a upload/* site/packages/
167+ - name : publish site
168+ env :
169+ GIT_COMMITTER_NAME : cli automation
170+ GIT_AUTHOR_NAME : cli automation
171+ GIT_COMMITTER_EMAIL : noreply@github.com
172+ GIT_AUTHOR_EMAIL : noreply@github.com
173+ run : |
174+ git -C site add packages
175+ git -C site commit -m"${GITHUB_REF} deb packages"
176+ git -C site push
65177 msi :
66178 needs : goreleaser
67179 runs-on : windows-latest
0 commit comments