make_deb #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: make_deb | |
on: | |
# push: | |
# branches: | |
# - 'main' | |
# - 'linux**' | |
workflow_run: | |
workflows: ["build linux"] | |
types: [completed] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Postdeploy | |
env: | |
BLACKBOX_SECRET: ${{ secrets.BLACKBOX_SECRET_KEY }} | |
run: authpass/_tools/postdeploy.sh | |
- id: build | |
run: | | |
path=debian/opt/authpass | |
cd "$path" | |
wget https://authpass-data.codeux.design/data/artifacts/authpass-linux-latest.tar.gz | |
tar -zxvf authpass-linux-latest.tar.gz authpass -C . --strip-components=1 | |
rm authpass-linux-latest.tar.gz | |
version=$(cat version.txt) | |
version_name=${version/+/_} | |
filename="authpass-linux-${version_name}.deb" | |
cd ../../../ | |
sed -i "s/^Version=1.0/Version=${version}/g" debian/usr/share/applications/authpass.desktop | |
sed -i "s/^Version: 1.0/Version: ${version}/g" debian/DEBIAN/control | |
dpkg-deb --build --root-owner-group ./debian | |
mv debian.deb $filename | |
echo "::set-output name=outputfilename::${filename}" | |
echo "::set-output name=outputpath::${filename}" | |
- name: upload artifact | |
run: ./authpass/_tools/upload-artifact.sh ${{ steps.build.outputs.outputfilename }} | |
- uses: docker://lpenz/ghaction-packagecloud:0.4 | |
with: | |
files: ${{ steps.build.outputs.outputpath }} | |
repository: authpass/debian/stretch | |
env: | |
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ steps.build.outputs.outputfilename }} | |
path: ${{ steps.build.outputs.outputpath }} | |
if-no-files-found: error |