Skip to content

v0.8.10rc0

v0.8.10rc0 #61

Workflow file for this run

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Upload Python Package
on:
release:
types: [published]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# build frida.min.js
- name: Set up Node
if: ${{ !env.ACT }}
uses: actions/setup-node@v3
with:
node-version: 16
- name: Build frida scripts
if: ${{ !env.ACT }}
run: cd agents/frida && npm install && npm run build
# build android-tools.apk
- name: Set up JDK 11
if: ${{ !env.ACT }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11
- name: Setup Android SDK
if: ${{ !env.ACT }}
uses: android-actions/setup-android@v2
- name: Build android tools
if: ${{ !env.ACT }}
run: cd agents/android && ./gradlew --no-daemon :tools:buildTools
# build python package
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade build
- name: Get previous tag
id: tag
uses: WyriHaximus/github-action-get-previous-tag@v1
- name: Build package
run: VERSION=${{ steps.tag.outputs.tag }} RELEASE=true python -m build --sdist --wheel
# publish python package
- name: Publish package
if: ${{ !env.ACT }}
uses: pypa/[email protected]
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
packages_dir: dist/
# push artifacts
- name: Commit files
if: ${{ !env.ACT }}
run: |
git config user.name github-actions
git config user.email [email protected]
git add src/linktools/assets/frida.js
git add src/linktools/assets/android-tools.json src/linktools/assets/android-tools.apk
git commit -m "Auto commit artifacts (${{ steps.tag.outputs.tag }})"
git tag -d ${{ steps.tag.outputs.tag }}
git tag ${{ steps.tag.outputs.tag }}
- name: Push changes
if: ${{ !env.ACT }}
uses: ad-m/github-push-action@master
with:
branch: master
force: true
tags: true