Skip to content

Merge pull request #398 from wh0am1i/master #24

Merge pull request #398 from wh0am1i/master

Merge pull request #398 from wh0am1i/master #24

Workflow file for this run

name: Release Package
on:
push:
tags:
- v*
jobs:
pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
pip install -r requirements.txt
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
homebrew:
runs-on: ubuntu-latest
needs:
- pypi
steps:
- name: Update Homebrew formula
uses: 13ph03nix/action-homebrew-bump-formula@v3
with:
token: ${{ secrets.BREW_TOKEN }}
formula: pocsuite3
aur:
runs-on: ubuntu-latest
needs:
- pypi
steps:
- name: Checkout PKGBUILD repo
run: |
echo "$AUR_SSH_KEY" > ~/aur_ssh_key
chmod 600 ~/aur_ssh_key
git config --global core.sshCommand "ssh -i ~/aur_ssh_key -o 'StrictHostKeyChecking=no'"
git clone "[email protected]:pocsuite3.git" .
env:
AUR_SSH_KEY: ${{ secrets.AUR_SSH_KEY }}
- name: Update Version
run: |
export VERSION=$(echo $GH_REF | sed 's:refs/tags/v::')
sed -i "s/^pkgver=.*\$/pkgver=${VERSION}/g" PKGBUILD
sed -i "s/^pkgrel=.*\$/pkgrel=1/g" PKGBUILD
env:
GH_REF: ${{ github.ref }}
- name: Update .SRCINFO and checksum
uses: 13ph03nix/archlinux-package-action@v2
with:
flags: ''
namcap: false
updpkgsums: true
srcinfo: true
- name: Commit and push changes
run: |
export VERSION=$(echo $GH_REF | sed 's:refs/tags/v::')
git config --global user.email "[email protected]"
git config --global user.name '13ph03nix'
git commit -a -m "Version ${VERSION} (automated version bump)"
git push origin master
env:
GH_REF: ${{ github.ref }}
dockerhub:
runs-on: ubuntu-latest
needs:
- pypi
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build
env:
GH_REF: ${{ github.ref }}
run: |
export VERSION=$(echo $GH_REF | sed 's:refs/tags/v::')
docker build --build-arg version=${VERSION} \
--tag pocsuite3/pocsuite3:v${VERSION} \
--tag pocsuite3/pocsuite3:latest \
.
- name: Login
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Push
run: |
docker push -a pocsuite3/pocsuite3