Skip to content

Eeep, fix job depends #11

Eeep, fix job depends

Eeep, fix job depends #11

Workflow file for this run

name: Build and Publish Debian Package
on:
push:
branches:
- master
jobs:
build-deb:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y dpkg-dev wget
- name: Build and install the .deb package
run: |
# Build the deb package
sudo dpkg-deb -b kali-anonsurf-deb-src/ kali-anonsurf.deb
# Install the .deb package
sudo dpkg -i kali-anonsurf.deb || (sudo apt-get -f install && sudo dpkg -i kali-anonsurf.deb)
- name: Get version from control file
run: |
VERSION=$(grep '^Version:' kali-anonsurf-deb-src/DEBIAN/control | cut -d' ' -f2)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Set up GitHub context
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Create and publish release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION="${{ env.VERSION }}"
RELEASE_NAME="kali-anonsurf-$VERSION"
TAG_NAME="v$VERSION"
echo "Creating release: $RELEASE_NAME (tag: $TAG_NAME)"
gh release create "$TAG_NAME" -t "$RELEASE_NAME" -n "Release for version $VERSION" kali-anonsurf.deb
notify-release:
needs: build-deb
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Get version from control file
run: |
VERSION=$(grep '^Version:' kali-anonsurf-deb-src/DEBIAN/control | cut -d' ' -f2)
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Call Webhook
run: |
curl -X POST \
-H 'Content-Type: application/json' \
-d '{
"text": "Published [Kali-anonsurf $VERSION](https://github.com/Und3rf10w/kali-anonsurf/releases/tag/$VERSION)!\n",
"format": "markdown", "displayName": "Github Actions - Kali-anonsurf"
}' \
${{ secrets.WEBHOOK_URL }}