Skip to content

enable gh cli

enable gh cli #6

Workflow file for this run

name: build
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
env:
GH_TOKEN: ${{ secrets.REPO_PAT }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: create sample script
run: |
mkdir -p package
# mkdir -p .debpkg/usr/lib/samplescript
# echo -e "echo sample" > .debpkg/usr/bin/samplescript
# chmod +x .debpkg/usr/bin/samplescript
# echo -e "a=1" > .debpkg/usr/lib/samplescript/samplescript.conf
# # create DEBIAN directory if you want to add other pre/post scripts
# mkdir -p .debpkg/DEBIAN
# echo -e "echo postinst" > .debpkg/DEBIAN/postinst
# chmod +x .debpkg/DEBIAN/postinst
- uses: jiro4989/build-deb-action@v3
id: build_deb
with:
package: ufw-applications
package_root: package
maintainer: ${{ github.repository_owner }}
version: ${{ github.ref }} # refs/tags/v*.*.*
arch: 'all'
depends: 'ufw'
desc: 'Extra UFW app profiles'
homepage: ${{ github.server_url }}/${{ github.repository }}
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{ steps.build_deb.outputs.file_name }}
generate_release_notes: true
make_latest: true
- name: Add to repo
run: |
REF_V=$(echo "${{ github.ref }}" | sed 's/v//g')
gh workflow run import.yaml --repo andrew-stclair/repo.andrew-stclair.com --field package=https://github.com/andrew-stclair/ufw-applications/releases/download/${{ github.ref }}/ufw-applications_${REF_V}_any.deb
# https://github.com/andrew-stclair/ufw-applications/releases/download/v0.0.1/ufw-applications_0.0.1_any.deb
# andrew-stclair/repo.andrew-stclair.com
# import.yaml