Skip to content

Commit

Permalink
add auto-release and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
mahaloz committed Nov 17, 2022
1 parent 186040b commit ad495df
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 1 deletion.
42 changes: 42 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Release

on:
push:
tags:
- "v**"

jobs:

release-github:
name: Create Github Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download Plugin
run: wget "https://github.com/mahaloz/d2d-ghidra-plugin/releases/latest/download/d2d-ghidra-plugin.zip"
- name: Create Release
uses: ncipollo/release-action@v1
with:
generateReleaseNotes: true
artifacts: "d2d-ghidra-plugin.zip"

release-pypi:
name: Release pypi package
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.6'
- name: Install build
run: pip install build
- name: Build dists
run: python -m build
- name: Release to PyPI
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
2 changes: 1 addition & 1 deletion decomp2dbg/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "3.0.0"
__version__ = "3.1.0"

try:
from .clients.client import DecompilerClient
Expand Down
6 changes: 6 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from pathlib import Path
import sys
from distutils.util import get_platform
from distutils.command.build import build as st_build

from setuptools import setup
from setuptools.command.develop import develop as st_develop
Expand Down Expand Up @@ -37,6 +38,10 @@ def _copy_decomp_plugins():
shutil.copytree("decompilers", "decomp2dbg/decompilers")
shutil.copy("d2d.py", "decomp2dbg/d2d.py")

class build(st_build):
def run(self, *args):
self.execute(_copy_decomp_plugins, (), msg="Copying binsync plugins")
super().run(*args)

class develop(st_develop):
def run(self, *args):
Expand All @@ -45,6 +50,7 @@ def run(self, *args):


cmdclass = {
"build": build,
"develop": develop,
}

Expand Down

0 comments on commit ad495df

Please sign in to comment.